t8y2/dbx · warning

system schema %s is not supported for custom type details

Error message

system schema %s is not supported for custom type details

What it means

getTypeDetails refuses to return custom-type details for types that live in a system schema (vastbase_metadata.go:601-603). System schemas (detected by isSystemSchema, e.g. pg_catalog/sys_catalog, information_schema, pg_temp, and similar) are rejected up front instead of running catalog queries against them, because their types are built-in, not user-defined custom types.

Source

Thrown at agents/drivers/vastbase-go/vastbase_metadata.go:602

WHERE r.rngtypid = %%d`, rangeTable, typeTable),
		collationName: fmt.Sprintf(`SELECT quote_ident(ncl.nspname) || '.' || quote_ident(cl.collname) FROM %s cl JOIN %s ncl ON ncl.oid = cl.collnamespace WHERE cl.oid = %%d`, collationTable, namespaceTable),
	}
}

// getTypeDetails returns read-only details of a user-defined type. MySQL
// compatibility mode is explicitly unsupported instead of running PostgreSQL
// catalog SQL against a MySQL-mode server.
func (s *server) getTypeDetails(schema, name string) (*customTypeDetails, error) {
	if s.mode.mysqlCompat {
		return nil, errors.New("type details are not supported in MySQL compatibility mode")
	}
	schema = strings.TrimSpace(schema)
	name = strings.TrimSpace(name)
	if schema == "" || name == "" {
		return nil, errors.New("schema and type name are required")
	}
	if isSystemSchema(schema) {
		return nil, fmt.Errorf("system schema %s is not supported for custom type details", schema)
	}
	catalog := "sys_catalog"
	if s.mode.postgresCatalog {
		catalog = "pg_catalog"
	}
	prefix := catalogPrefix(catalog)
	queries := customTypeCatalogQueriesFor(catalog, prefix, schema, name)

	rows, err := s.metadataQuery(queries.general)
	if err != nil {
		return nil, fmt.Errorf("failed to locate custom type %s.%s: %w", schema, name, err)
	}
	defer rows.Close()
	if !rows.Next() {
		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)

View on GitHub (pinned to c0390bff16)

Solutions

  1. Filter out system schemas before requesting type details; only request details for user schemas (e.g. public or application schemas).
  2. Treat this error as an expected 'unsupported' signal and skip the object rather than retrying.
  3. If you need info about built-in types, query the catalog metadata/columns endpoints instead of get_type_details.
  4. Check the isSystemSchema implementation to know exactly which schema names are rejected and exclude them client-side.

Example fix

// before
getTypeDetails("pg_catalog", "int4") // rejected: system schema
// after
if !isSystemSchema(schema) {
    getTypeDetails(schema, "my_enum_type")
}
Defensive patterns

Strategy: validation

When it happens

Trigger: Calling the get_type_details method (s.getTypeDetails(schema, name)) with schema set to a system schema such as 'pg_catalog', 'information_schema', or the Vastbase 'sys_catalog' equivalents.

Common situations: UI or tooling auto-filling the schema from a catalog listing without filtering system schemas; user browsing built-in types like 'int4' or 'text' and requesting details; automated scripts iterating all schemas including system ones.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/9dd21ab6d5a3355c. Report an issue: GitHub.