t8y2/dbx · error

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

Returned by server.getTypeDetails in the kingbase-go driver when the requested type lives in a system schema (sys_catalog, pg_catalog, information_schema and similar per isSystemSchema). Custom type details are only exposed for user schemas; system catalog types are deliberately excluded to avoid running detail queries against internal objects.

Source

Thrown at agents/drivers/kingbase-go/kingbase_metadata.go:672

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. Query a type in a user-created schema instead
  2. For built-in type info use standard catalog tooling/queries rather than custom type details
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at agents/drivers/kingbase-go/kingbase_metadata.go:672 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/91468d3ef1cbce91. Report an issue: GitHub.