Differences

This shows you the differences between two versions of the page.

postgresql:oid [January 03, 2012 11:59 am]
sqlines
postgresql:oid [January 20, 2012 10:44 pm] (current)
sqlines
Line 1: Line 1:
====== PostgreSQL - OID System Column - Table with OIDs (Identity, Autoincrement) ====== ====== PostgreSQL - OID System Column - Table with OIDs (Identity, Autoincrement) ======
-OID is auto-incrementing integer value, unique within a PostgreSQL database that can be automatically assigned to //each row// of a table created WITH OIDS option.+OID is auto-incrementing integer value, //unique// within a PostgreSQL //database// (not just a table) that can be automatically assigned to //each row// of a table created WITH OIDS option.
Although OID can be used as an identity (auto-increment) primary key column, it is recommended to use SERIAL data type instead. For more information, see [[/postgresql/datatypes/serial|Generating IDs in PostgreSQL]]. Although OID can be used as an identity (auto-increment) primary key column, it is recommended to use SERIAL data type instead. For more information, see [[/postgresql/datatypes/serial|Generating IDs in PostgreSQL]].