{"record":{"id":"16196a7a14ce2ac4","repo":"t8y2/dbx","slug":"custom-type-s-s-is-not-fully-defined","errorCode":null,"errorMessage":"custom type %s.%s is not fully defined","messagePattern":"custom type (.+?)\\.(.+?) is not fully defined","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/kingbase-go/kingbase_metadata.go","lineNumber":705,"sourceCode":"\t\tif err := rows.Err(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to read type %s.%s: %w\", schema, name, err)\n\t\t}\n\t\treturn nil, fmt.Errorf(\"custom type %s.%s does not exist\", schema, name)\n\t}\n\tvar oid, typbasetype, typrelid, typelem, typcollation int64\n\tvar typtype, typalign, typstorage string\n\tvar typisdefined, typnotnull, typbyval bool\n\tvar typdefaultbin, typdefault, inputFn, outputFn, receiveFn, sendFn, analyzeFn, comment, collname, relkind sql.NullString\n\tvar typlen sql.NullInt64\n\tvar typtypmod int64\n\tif err := rows.Scan(&oid, &typtype, &typisdefined, &typbasetype, &typnotnull, &typrelid, &typelem, &typcollation, &typdefaultbin, &typdefault, &typlen, &typbyval, &typalign, &typstorage, &typtypmod, &inputFn, &outputFn, &receiveFn, &sendFn, &analyzeFn, &comment, &relkind, &collname); err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read type %s.%s: %w\", schema, name, err)\n\t}\n\tif err := rows.Close(); err != nil {\n\t\treturn nil, err\n\t}\n\tif !typisdefined {\n\t\treturn nil, fmt.Errorf(\"custom type %s.%s is not fully defined\", schema, name)\n\t}\n\tif typelem != 0 {\n\t\treturn nil, fmt.Errorf(\"custom type %s.%s is an array companion type\", schema, name)\n\t}\n\tkind, ok := customTypeKindFromCode(typtype)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"custom type %s.%s is a pseudo type (typtype=%s)\", schema, name, typtype)\n\t}\n\tif relkind.Valid && relkind.String != \"\" && relkind.String != \"c\" {\n\t\treturn nil, fmt.Errorf(\"%s.%s is the auto-generated row type of a relation, not an independent custom type\", schema, name)\n\t}\n\n\tproperties := customTypeCommonProperties(inputFn, outputFn, receiveFn, sendFn, analyzeFn, typlen, typbyval, typalign, typstorage)\n\tproperties.DomainConstraints = []customTypeDomainConstraint{}\n\tdetails := &customTypeDetails{\n\t\tName:       name,\n\t\tSchema:     schema,\n\t\tKind:       kind,","sourceCodeStart":687,"sourceCodeEnd":723,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/kingbase-go/kingbase_metadata.go#L687-L723","documentation":"Returned by server.getTypeDetails in kingbase-go when the catalog row for the type was read but typisdefined is false — the type entry exists in the catalog in a partially-created/pending state (e.g. a failed CREATE TYPE left an undefined shell), so its details cannot be meaningfully rendered.","triggerScenarios":"Thrown at agents/drivers/kingbase-go/kingbase_metadata.go:705 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop and recreate the type cleanly to clear the undefined shell entry","Check for an in-progress or failed type DDL transaction holding the entry","Inspect pg_type/sys_type for the typisdefined flag to confirm"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}