{"id":"7950d9219d5bfeee","repo":"jackc/pgx","slug":"no-type-names-were-supplied","errorCode":null,"errorMessage":"No type names were supplied.","messagePattern":"No type names were supplied\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"derived_types.go","lineNumber":172,"sourceCode":"    ORDER BY MAX(depth) desc, typname;`)\n\treturn strings.Join(parts, \"\")\n}\n\ntype derivedTypeInfo struct {\n\tOid, Typbasetype, Typelem, Rngsubtype, Rngtypid uint32\n\tTypeName, Typtype, NspName                      string\n\tAttnames                                        []string\n\tAtttypids                                       []uint32\n}\n\n// LoadTypes performs a single (complex) query, returning all the required\n// information to register the named types, as well as any other types directly\n// or indirectly required to complete the registration.\n// The result of this call can be passed into RegisterTypes to complete the process.\nfunc (c *Conn) LoadTypes(ctx context.Context, typeNames []string) ([]*pgtype.Type, error) {\n\tm := c.TypeMap()\n\tif len(typeNames) == 0 {\n\t\treturn nil, fmt.Errorf(\"No type names were supplied.\")\n\t}\n\n\t// Disregard server version errors. This will result in\n\t// the SQL not support recent structures such as multirange\n\tserverVersion, _ := serverVersion(c)\n\tsql := buildLoadDerivedTypesSQL(serverVersion, typeNames)\n\trows, err := c.Query(ctx, sql, QueryResultFormats{TextFormatCode}, typeNames)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"While generating load types query: %w\", err)\n\t}\n\tdefer rows.Close()\n\tresult := make([]*pgtype.Type, 0, 100)\n\tfor rows.Next() {\n\t\tti := derivedTypeInfo{}\n\t\terr = rows.Scan(&ti.TypeName, &ti.NspName, &ti.Typtype, &ti.Typbasetype, &ti.Typelem, &ti.Oid, &ti.Rngtypid, &ti.Rngsubtype, &ti.Attnames, &ti.Atttypids)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"While scanning type information: %w\", err)\n\t\t}","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/derived_types.go#L154-L190","documentation":"Error \"No type names were supplied.\" thrown in jackc/pgx.","triggerScenarios":"Thrown at derived_types.go:172 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}