{"record":{"id":"28eb771dcebb5927","repo":"t8y2/dbx","slug":"custom-type-s-s-is-a-pseudo-type-typtype-s-28eb77","errorCode":null,"errorMessage":"custom type %s.%s is a pseudo type (typtype=%s)","messagePattern":"custom type (.+?)\\.(.+?) is a pseudo type \\(typtype=(.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/vastbase-go/vastbase_metadata.go","lineNumber":642,"sourceCode":"\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,\n\t\tComment:    nullStringPtr(comment),\n\t\tMembers:    []customTypeMember{},\n\t\tProperties: properties,\n\t}\n\n\tvar warnings []string\n\tswitch kind {","sourceCodeStart":624,"sourceCodeEnd":660,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/vastbase-go/vastbase_metadata.go#L624-L660","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nsrv.getTypeDetails(\"public\", \"any\") // pseudo type, typtype='p'\n// after\nsrv.getTypeDetails(\"public\", \"status_enum\") // a real custom type","handlingStrategy":"validation","validationCode":"if pseudoTypes[name] { return nil, errors.New(\"pseudo type requested\") }","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"pseudo type\") { /* skip this type */ }","preventionTips":["Skip typtype='p' rows during introspection","Validate type names before lookup"],"tags":["postgres","metadata","pseudo-type","catalog"],"backgroundTag":"pseudo-type-not-supported","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"}