> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OID

The object identifier (`OID`) [data type](https://docs.cockroachlabs.com/docs/v24.2/data-types) stores an unsigned 32-bit integer value.

OIDs are used internally as primary keys for tables in [system catalogs](https://docs.cockroachlabs.com/docs/v24.2/system-catalogs), notably `information_schema` and `pg_catalog`.

CockroachDB supports many [functions](https://docs.cockroachlabs.com/docs/v24.2/functions-and-operators#built-in-functions) that accept OIDs as argument types and return OIDs, and [operators](https://docs.cockroachlabs.com/docs/v24.2/functions-and-operators#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.

## Size

A `OID` value is 32 bits in width.

## Best practices

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

* [Data Types](https://docs.cockroachlabs.com/docs/v24.2/data-types)
* [Functions and Operators](https://docs.cockroachlabs.com/docs/v24.2/functions-and-operators)
* [System Catalogs](https://docs.cockroachlabs.com/docs/v24.2/system-catalogs)
