t8y2/dbx · error
custom type %s.%s is not fully defined
Error message
custom type %s.%s is not fully defined
What it means
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.
Source
Thrown at agents/drivers/kingbase-go/kingbase_metadata.go:705
if err := rows.Err(); err != nil {
return nil, fmt.Errorf("failed to read type %s.%s: %w", schema, name, err)
}
return nil, fmt.Errorf("custom type %s.%s does not exist", schema, name)
}
var oid, typbasetype, typrelid, typelem, typcollation int64
var typtype, typalign, typstorage string
var typisdefined, typnotnull, typbyval bool
var typdefaultbin, typdefault, inputFn, outputFn, receiveFn, sendFn, analyzeFn, comment, collname, relkind sql.NullString
var typlen sql.NullInt64
var typtypmod int64
if 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 {
return nil, fmt.Errorf("failed to read type %s.%s: %w", schema, name, err)
}
if err := rows.Close(); err != nil {
return nil, err
}
if !typisdefined {
return nil, fmt.Errorf("custom type %s.%s is not fully defined", schema, name)
}
if typelem != 0 {
return nil, fmt.Errorf("custom type %s.%s is an array companion type", schema, name)
}
kind, ok := customTypeKindFromCode(typtype)
if !ok {
return nil, fmt.Errorf("custom type %s.%s is a pseudo type (typtype=%s)", schema, name, typtype)
}
if relkind.Valid && relkind.String != "" && relkind.String != "c" {
return nil, fmt.Errorf("%s.%s is the auto-generated row type of a relation, not an independent custom type", schema, name)
}
properties := customTypeCommonProperties(inputFn, outputFn, receiveFn, sendFn, analyzeFn, typlen, typbyval, typalign, typstorage)
properties.DomainConstraints = []customTypeDomainConstraint{}
details := &customTypeDetails{
Name: name,
Schema: schema,
Kind: kind,View on GitHub (pinned to c0390bff16)
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at agents/drivers/kingbase-go/kingbase_metadata.go:705 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/16196a7a14ce2ac4.
Report an issue: GitHub.