t8y2/dbx · error
custom type %s.%s is a pseudo type (typtype=%s)
Error message
custom type %s.%s is a pseudo type (typtype=%s)
What it means
The scanned typtype code is not one the library recognizes as a supported custom-type kind (enum, composite, domain, range, multirange, base), per customTypeKindFromCode(). This means the entry is a pseudo type (e.g. 'any', 'record', 'void', 'trigger', internal pseudo-types) or an unrecognized typtype value, so the library cannot classify or describe it as a custom type.
Source
Thrown at agents/drivers/vastbase-go/vastbase_metadata.go:642
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,
Comment: nullStringPtr(comment),
Members: []customTypeMember{},
Properties: properties,
}
var warnings []string
switch kind {View on GitHub (pinned to c0390bff16)
Solutions
- Use a real user-defined type name; pseudo types cannot have custom-type details
- Exclude pseudo types from introspection (they have typtype='p' or codes unknown to the driver) before calling getTypeDetails
- If a valid type yields this error, check the driver version supports your server's typtype codes and upgrade
- Log the reported typtype value to identify which pseudo/unknown code was encountered
Example fix
// before
srv.getTypeDetails("public", "any") // pseudo type, typtype='p'
// after
srv.getTypeDetails("public", "status_enum") // a real custom type Defensive patterns
Strategy: validation
Validate before calling
if pseudoTypes[name] { return nil, errors.New("pseudo type requested") } Try / catch
if err != nil && strings.Contains(err.Error(), "pseudo type") { /* skip this type */ } Prevention
- Skip typtype='p' rows during introspection
- Validate type names before lookup
When it happens
Trigger: Requesting details for a pseudo type name such as any, anyelement, record, void, trigger, or cstring; passing a type name that resolves to a pseudo type OID in pg_type; running against a newer/older server whose typtype codes differ from those the driver knows.
Common situations: Generic tooling that iterates all pg_type rows and passes every name through; templates or configs where a placeholder like 'any' leaked into the type name; version mismatch between the driver's supported typtype table and the server.
Related errors
- custom type %s.%s does not exist
- custom type %s.%s is not fully defined
- custom type %s.%s is an array companion type
- custom type %s.%s is a pseudo type (typtype=%s)
- %s.%s is the auto-generated row type of a relation, not an i
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/28eb771dcebb5927.
Report an issue: GitHub.