mirror of
https://github.com/postgres/postgres.git
synced 2025-12-22 17:42:17 +03:00
Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.43 2001/06/19 22:39:08 tgl Exp $
|
||||
$Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.44 2001/08/10 18:57:32 tgl Exp $
|
||||
-->
|
||||
|
||||
<chapter id="sql-syntax">
|
||||
@@ -641,8 +641,9 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
|
||||
<primary>OID</primary>
|
||||
</indexterm>
|
||||
The unique identifier (object ID) of a row. This is a serial number
|
||||
that is added by Postgres to all rows automatically. OIDs are not
|
||||
reused and are 32-bit quantities.
|
||||
that is automatically added by Postgres to all table rows (unless
|
||||
the table was created WITHOUT OIDS, in which case this column is
|
||||
not present).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -686,8 +687,10 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
|
||||
<listitem>
|
||||
<para>
|
||||
The identity (transaction ID) of the deleting transaction,
|
||||
or zero for an undeleted tuple. In practice, this is never nonzero
|
||||
for a visible tuple.
|
||||
or zero for an undeleted tuple. It is possible for this field
|
||||
to be nonzero in a visible tuple: that indicates that the
|
||||
deleting transaction hasn't committed yet, or that an attempted
|
||||
deletion was rolled back.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -697,7 +700,6 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
|
||||
<listitem>
|
||||
<para>
|
||||
The command identifier within the deleting transaction, or zero.
|
||||
Again, this is never nonzero for a visible tuple.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -720,10 +722,27 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
OIDs are 32-bit quantities and are assigned from a single cluster-wide
|
||||
counter. In a large or long-lived database, it is possible for the
|
||||
counter to wrap around. Hence, it is bad practice to assume that OIDs
|
||||
are unique, unless you take steps to ensure that they are unique.
|
||||
Recommended practice when using OIDs for row identification is to create
|
||||
a unique index on the OID column of each table for which the OID will be
|
||||
used. Never assume that OIDs are unique across tables; use the
|
||||
combination of tableoid and row OID if you need a database-wide
|
||||
identifier. (Future releases of Postgres are likely to use a separate
|
||||
OID counter for each table, so that tableoid <emphasis>must</> be
|
||||
included to arrive at a globally unique identifier.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Transaction and command identifiers are 32-bit quantities.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For further information on the system attributes consult
|
||||
<xref linkend="STON87a" endterm="STON87a">.
|
||||
Transaction and command identifiers are 32-bit quantities.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
Reference in New Issue
Block a user