# oid type
Express a PostgreSQL-compatible object identifier

> For the complete documentation index, see [llms.txt](https://preview.materialize.com/materialize/40269/llms.txt).


`oid` expresses a PostgreSQL-compatible object identifier.

Detail | Info
-------|------
**Size** | 4 bytes
**Catalog name** | `pg_catalog.oid`
**OID** | 26

## Details

`oid` types in Materialize are provided for compatibility with PostgreSQL. You
typically will not interact with the `oid` type unless you are working with a
tool that was developed for PostgreSQL.

See the [Object Identifier Types][pg-oid] section of the PostgreSQL
documentation for more details.

### Valid casts

#### From `oid`

You can [cast](https://preview.materialize.com/materialize/40269/markdown-docs/sql/functions/cast/index.md) `oid` to:

- [`integer`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/integer/index.md) (by assignment)
- [`bigint`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/integer/index.md) (by assignment)
- [`text`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/text/index.md) (explicitly)

#### To `oid`

You can [cast](https://preview.materialize.com/materialize/40269/markdown-docs/sql/functions/cast/index.md) from the following types to `oid`:

- [`integer`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/integer/index.md) (implicitly)
- [`bigint`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/integer/index.md) (implicitly)
- [`text`](https://preview.materialize.com/materialize/40269/markdown-docs/sql/types/text/index.md) (explicitly)

[pg-oid]: https://www.postgresql.org/docs/current/datatype-oid.html
