July 2005
Intermediate to advanced
1032 pages
27h 10m
English
An OID is a 32-bit, positive whole number. Every row[5] in a PostgreSQL database contains a unique identifier[6]—the object ID (or OID). Normally, the OID column is hidden. You can see the OID for a row by including the OID column in the target list of a SELECT statement:
[5] By default, all tables are created such that every row contains an OID. You can omit the object IDs using the WITHOUT OIDS clause of the CREATE TABLE command.
[6] The PostgreSQL documentation warns that object IDs are currently unique within a database cluster; but in a future release, an OID may be unique only within a single table.
movies=# SELECT OID, * FROM customers; oid | customer_id | customer_name | phone | birth_date | balance -------+-------------+----------------------+----------+------------+--------- ...
Read now
Unlock full access