On this page Carat arrow pointing down
Cockroach Labs will stop providing Assistance Support for v22.1 on November 24, 2023. Prior to that date, upgrade to a more recent version to continue receiving support. For more details, see the Release Support Policy.

The object identifier (OID) data type stores an unsigned 32-bit integer value.

OIDs are used internally as primary keys for tables in system catalogs, notably information_schema and pg_catalog.

CockroachDB supports many functions that accept OIDs as argument types and return OIDs, and operators that operate on OIDs and other data types. These functions are used by drivers and ORMs and you can use these functions to introspect your schema.


A OID value is 32 bits in width.


You should not:

  • Use OIDs in user-created tables. Values of this type are not guaranteed to be stable across major releases.
  • Rely on OIDs to be globally unique. Each OID subtype is unique only within a certain namespace.

See also

Yes No
On this page

Yes No