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
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.
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.