Quantcast
Channel: Planet PostgreSQL
Viewing all articles
Browse latest Browse all 9649

Bruce Momjian: What Are Oids

$
0
0

Object Identifiers (oids) were added to Postgres as a way to uniquely identify database objects, e.g. rows, tables, functions, etc. It is part of Postgres's object-relational heritage.

Because oids where assigned to every data row by default, and were only four-bytes in size, they were increasingly seen as unnecessary. In Postgres 7.2 (2002), they were made optional, and in Postgres 8.1 (2005), after much warning, oids were no longer assigned to user tables by default. They are still used by system tables, and can still be added to user tables using the with oids clause during create table. Server parameter default_with_oids controls the default mode for table creation (defaults to "false").

Oids as still used extensively for system table rows, and are used to join system tables, e.g.:

Continue Reading »


Viewing all articles
Browse latest Browse all 9649

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>