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

# OID

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

The object identifier (`OID`) <InternalLink path="data-types">data type</InternalLink> stores an unsigned 32-bit integer value.

OIDs are used internally as primary keys for tables in <InternalLink path="system-catalogs">system catalogs</InternalLink>, notably `information_schema` and `pg_catalog`.

CockroachDB supports many <InternalLink path="functions-and-operators#built-in-functions">functions</InternalLink> that accept OIDs as argument types and return OIDs, and <InternalLink path="functions-and-operators#operators">operators</InternalLink> 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

* <InternalLink path="data-types">Data Types</InternalLink>
* <InternalLink path="functions-and-operators">Functions and Operators</InternalLink>
* <InternalLink path="system-catalogs">System Catalogs</InternalLink>
