11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.32 2001/01/06 11:58:56 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/syntax.sgml,v 1.33 2001/01/08 22:07:47 tgl Exp $
33-->
44
55<chapter id="sql-syntax">
@@ -568,27 +568,33 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
568568 <term>oid</term>
569569 <listitem>
570570<para>
571- stands for the unique identifier ofan instance which isadded by
572- Postgres to allinstances automatically. OIDs are not reused and are
573- 32-bit quantities.
571+ The unique identifier(object ID) ofa row. This isa serial number
572+ that is added by Postgres to allrows automatically. OIDs are not
573+ reused and are 32-bit quantities.
574574</para>
575575 </listitem>
576576 </varlistentry>
577577
578578 <varlistentry>
579- <term>xmin </term>
579+ <term>tableoid </term>
580580 <listitem>
581581<para>
582- The identity of the inserting transaction.
582+ The OID of the table containing this row. This attribute is
583+ particularly handy for queries that select from inheritance
584+ hierarchies, since without it, it's difficult to tell which
585+ individual table a row came from. The tableoid can be joined
586+ against the OID attribute of pg_class to obtain the table name.
583587</para>
584588 </listitem>
585589 </varlistentry>
586590
587591 <varlistentry>
588- <term>xmax </term>
592+ <term>xmin </term>
589593 <listitem>
590594<para>
591- The identity of the deleting transaction.
595+ The identity (transaction ID) of the inserting transaction for
596+ this tuple. (Note: a tuple is an individual state of a row;
597+ each UPDATE of a row creates a new tuple for the same logical row.)
592598</para>
593599 </listitem>
594600 </varlistentry>
@@ -597,7 +603,19 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
597603 <term>cmin</term>
598604 <listitem>
599605<para>
600- The command identifier within the inserting transaction.
606+ The command identifier (starting at zero) within the inserting
607+ transaction.
608+ </para>
609+ </listitem>
610+ </varlistentry>
611+
612+ <varlistentry>
613+ <term>xmax</term>
614+ <listitem>
615+ <para>
616+ The identity (transaction ID) of the deleting transaction,
617+ or zero for an undeleted tuple. In practice, this is never nonzero
618+ for a visible tuple.
601619</para>
602620 </listitem>
603621 </varlistentry>
@@ -606,7 +624,24 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
606624 <term>cmax</term>
607625 <listitem>
608626<para>
609- The command identifier within the deleting transaction.
627+ The command identifier within the deleting transaction, or zero.
628+ Again, this is never nonzero for a visible tuple.
629+ </para>
630+ </listitem>
631+ </varlistentry>
632+
633+ <varlistentry>
634+ <term>ctid</term>
635+ <listitem>
636+ <para>
637+ The tuple ID of the tuple within its table. This is a pair
638+ (block number, tuple index within block) that identifies the
639+ physical location of the tuple. Note that although the ctid
640+ can be used to locate the tuple very quickly, a row's ctid
641+ will change each time it is updated or moved by VACUUM.
642+ Therefore ctid is useless as a long-term row identifier.
643+ The OID, or even better a user-defined serial number, should
644+ be used to identify logical rows.
610645</para>
611646 </listitem>
612647 </varlistentry>