In PostgreSQL, the concept of Object Identifier (OID) refers to a unique identifier assigned to each row in a table. By default, PostgreSQL used to assign OIDs to tables, but it has been deprecated and is no longer enabled by default in recent versions.
OIDs can be useful in certain scenarios. Here are a few reasons why they were used in the past:
1. Data referencing: OIDs can serve as a reference to a specific row within a table. Other tables or columns can store the OID values to establish relationships or point to a specific row in a different table.
2. Internal system tables: PostgreSQL uses OIDs internally to manage system tables. These tables store metadata and information about the database system itself, and the OIDs help to uniquely identify and manage these system tables.
3. Large Object (LOB) support: PostgreSQL has a feature called Large Objects, which allows storing binary data (such as images, audio, or documents) in the database. OIDs were used to manage and reference these large objects.
However, due to various reasons including performance concerns and potential security issues, the use of OIDs in user-defined tables has been deprecated. The "WITH (OIDS = FALSE)" clause in the table creation statement you mentioned is used to explicitly disable the use of OIDs for the specific table.
In modern PostgreSQL databases, it is recommended to use primary keys, foreign keys, and other relational mechanisms to establish relationships between tables and reference specific rows, rather than relying on OIDs.