PostgreSQL system catalog tables Stay organized with collections Save and categorize content based on your preferences.
This page contains information about the PostgreSQL system catalogtables available in Spanner.
PostgreSQL system catalog tablesstore schema data, such as information about tables and columns, and internalbookkeeping information. These system catalog tables are part of a namespacecalledpg_catalog.
Limitations and differences
This section lists the columns that are missing and other differences betweenthe Spanner implementation of PostgreSQL system catalogtables and PostgreSQL.
Unsupported columns
Spanner doesn't support every column in its implementation ofPostgreSQL system catalog tables. The following columns aren'tsupported and therefore don't show up in the table.
| Catalog table name | Missing column names |
|---|---|
pg_am | amhandler |
pg_attribute | attacl,attmissingval |
pg_class | relacl |
pg_namespace | nspacl |
pg_proc | prosupport,proacl |
pg_sequences | data_type |
pg_type | typsubscript,typinput,typoutput,typreceive,typsend,typmodin,typmodout,typanalyze,typacl |
Empty columns
Some columns in supported system catalog tables don't contain data. Thesecolumns could have content added later so avoid queries that rely on thesecolumns being empty. For each table listed on this page, supported columns arelisted, along with information about whether or not the column has content.
Empty tables
Some tables and views have no data in them. This is so that queries can refer tothem without encountering errors. This improves compatibility with tools withoutrequiring rewrites to avoid those tables.
Difference from PostgreSQL
In PostgreSQL, you can write to these tables directly to modify thedatabase. In Spanner, system tables are read-only.
The Spanner implementation contains the following changes toPostgreSQL system catalog columns:
pg_node_treecolumns (most notablypg_attrdef.adbinandpg_proc.prosqlbody) are text columns that contain the SQLexpressions.oidvectorcolumns (most notablypg_proc.proargtypes) areoid[]columns.int2vectorcolumns areint8[]columns.pg_class.relnattscolumn isNULLfor sequences because you can't selectthem in Spanner.pg_collationonly contains default and C. General collation support isn'tavailable.
PostgreSQL system catalog tables list
This section contains the PostgreSQL system catalog tables thatSpanner supports.
pg_am
Thepg_amtable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
amname | text | Y |
amtype | char | Y |
pg_attrdef
Thepg_attrdeftable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
adrelid | oid | Y |
adnum | int8 | Y |
adbin | text | Y |
Theadbin column should contain atext value that represents the serializedvalue of the default value.
pg_attribute
Thepg_attributetable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
attrelid | oid | Y |
attname | text | Y |
atttypid | oid | Y |
attstattarget | int8 | N |
attlen | int8 | N |
attnum | int8 | Y |
attndims | int8 | Y |
attcacheoff | int8 | Y |
atttypmod | int8 | N |
attbyval | bool | N |
attalign | char | N |
attstorage | char | N |
attcompression | char | Y |
attnotnull | bool | Y |
atthasdef | bool | Y |
atthasmissing | bool | Y |
attidentity | char | Y |
attgenerated | char | Y |
attisdropped | bool | Y |
attislocal | bool | Y |
attinhcount | int8 | Y |
attcollation | oid | N |
attoptions | text[] | N |
attfdwoptions | text[] | N |
pg_class
Thepg_class
has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
relname | text | Y |
relnamespace | oid | Y |
reltype | oid | N |
reloftype | oid | N |
relowner | oid | N |
relam | oid | Y |
relfilenode | oid | N |
reltablespace | oid | N |
relpages | int8 | N |
reltuples | float8 | N |
relallvisible | int8 | N |
reltoastrelid | oid | N |
relhasindex | bool | Y |
relisshared | bool | N |
relpersistence | char | Y |
relkind | char | Y |
relnatts | int8 | Y |
relchecks | int8 | Y |
relhasrules | bool | N |
relhastriggers | bool | N |
relhassubclass | bool | N |
relrowsecurity | bool | N |
relforcerowsecurity | bool | N |
relispopulated | bool | Y |
relreplident | char | N |
relispartition | bool | N |
relrewrite | oid | N |
relfrozenxid | int8 | N |
relminmxid | int8 | N |
reloptions | text[] | N |
relpartbound | text | N |
pg_collation
Thepg_collationtable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
collname | text | Y |
collnamespace | oid | Y |
collowner | oid | N |
collprovider | char | Y |
collisdeterministic | bool | Y |
collencoding | int8 | Y |
collcollate | text | N |
collctype | text | N |
colliculocale | text | N |
collversion | text | N |
pg_constraint
Thepg_constrainttable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
conname | text | Y |
connamespace | oid | Y |
contype | char | Y |
condeferrable | bool | N |
condeferred | bool | N |
convalidated | bool | Y |
conrelid | oid | Y |
contypid | oid | N |
conindid | oid | N |
conparentid | oid | N |
confrelid | oid | Y |
confupdtype | char | Y |
confdeltype | char | Y |
confmatchtype | char | N |
conislocal | bool | N |
coninhcount | int8 | N |
connoinherit | bool | N |
conkey | int8[] | Y |
confkey | int8[] | Y |
conpfeqop | oid[] | N |
conppeqop | oid[] | N |
conffeqop | oid[] | N |
conexclop | oid[] | N |
confdelsetcols | int8[] | N |
conbin | text | N |
pg_description
Thepg_descriptiontable has no content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
objoid | oid | N |
classoid | oid | N |
objsubid | int64 | N |
description | text | N |
pg_enum
Thepg_enum
table has no content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | N |
enumtypid | oid | N |
collnamespace | float8 | N |
enumlabel | text | N |
pg_index
Thepg_index
table has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
indexrelid | oid | Y |
indrelid | oid | Y |
indnatts | int8 | Y |
indnkeyatts | int8 | Y |
indisunique | bool | Y |
indnullsnotdistinct | bool | N |
indisprimary | bool | Y |
indisexclusion | bool | Y |
indimmediate | bool | N |
indisclustered | bool | Y |
indisvalid | bool | Y |
indcheckxmin | bool | Y |
indisready | bool | Y |
indislive | bool | Y |
indisreplident | bool | Y |
indkey | int8[] | N |
indcollation | oid[] | N |
indclass | oid[] | N |
indoption | int8[] | N |
indexprs | text | N |
indpred | text | N |
pg_namespace
Thepg_namespacetable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
nspname | text | Y |
nspowner | oid | N |
pg_proc
Thepg_proc tablehas content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
proname | text | Y |
pronamespace | oid | Y |
proowner | oid | N |
prolang | oid | N |
procost | float8 | N |
prorows | float8 | N |
provariadic | oid | Y |
prokind | char | Y |
prosecdef | bool | N |
proleakproof | bool | N |
proisstrict | bool | N |
proretset | bool | Y |
provolatile | char | N |
proparallel | char | N |
pronargs | int8 | Y |
pronargdefaults | int8 | Y |
prorettype | oid | Y |
proargtypes | oid[] | Y |
proallargtypes | oid[] | N |
proargmodes | char[] | N |
proargdefaults | text | N |
protrftypes | oid[] | N |
prosrc | text[] | N |
probin | text[] | N |
prosqlbody | text | Y |
proconfig | text[] | N |
pg_sequence
Thepg_sequencetable has content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
seqrelid | oid | Y |
seqtypid | oid | Y |
seqstart | int8 | Y |
seqincrement | int8 | N |
seqmax | int8 | N |
seqmin | int8 | N |
seqcache | int8 | Y |
seqcycle | bool | Y |
pg_type
Thepg_type tablehas content.
The following table shows whether columns have content.
| Column name | Type | Has content |
|---|---|---|
oid | oid | Y |
typname | text | Y |
typnamespace | oid | Y |
typowner | oid | N |
typlen | int8 | Y |
typbyval | bool | Y |
typtype | char | Y |
typcategory | char | Y |
typispreferred | bool | Y |
typisdefined | bool | Y |
typdelim | char | Y |
typrelid | oid | Y |
typelem | oid | Y |
typarray | oid | Y |
typalign | char | N |
typstorage | char | N |
typnotnull | bool | N |
typbasetype | oid | N |
typtypmod | int8 | N |
typndims | int8 | N |
typcollation | oid | N |
typdeafultbin | text | N |
typdefault | text | N |
What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.