Commit f6b39171 authored by Andres Freund's avatar Andres Freund

docs: cleanup/remove/update references to OID column.

I (Andres) missed these in 578b2297.

Author: Justin Pryzby, editorialized a bit by Andres Freund
Reviewed-By: Daniel Verite, Andres Freund
Discussion: https://postgr.es/m/20190408002847.GA904@telsasoft.com
parent 421a2c48
...@@ -1047,7 +1047,7 @@ ...@@ -1047,7 +1047,7 @@
<entry></entry> <entry></entry>
<entry> <entry>
The number of the column. Ordinary columns are numbered from 1 The number of the column. Ordinary columns are numbered from 1
up. System columns, such as <structfield>oid</structfield>, up. System columns, such as <structfield>ctid</structfield>,
have (arbitrary) negative numbers. have (arbitrary) negative numbers.
</entry> </entry>
</row> </row>
......
...@@ -1202,8 +1202,7 @@ CREATE TABLE circles ( ...@@ -1202,8 +1202,7 @@ CREATE TABLE circles (
<structfield>ctid</structfield> will change if it is <structfield>ctid</structfield> will change if it is
updated or moved by <command>VACUUM FULL</command>. Therefore updated or moved by <command>VACUUM FULL</command>. Therefore
<structfield>ctid</structfield> is useless as a long-term row <structfield>ctid</structfield> is useless as a long-term row
identifier. The OID, or even better a user-defined serial identifier. A primary key should be used to identify logical rows.
number, should be used to identify logical rows.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -3675,8 +3674,7 @@ VALUES ('Albany', NULL, NULL, 'NY'); ...@@ -3675,8 +3674,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
<command>CREATE TABLE</command>, nor is it possible to add columns to <command>CREATE TABLE</command>, nor is it possible to add columns to
partitions after-the-fact using <command>ALTER TABLE</command>. Tables may be partitions after-the-fact using <command>ALTER TABLE</command>. Tables may be
added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command> added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
only if their columns exactly match the parent, including any only if their columns exactly match the parent.
<literal>oid</literal> column.
</para> </para>
</listitem> </listitem>
......
...@@ -1312,7 +1312,7 @@ ...@@ -1312,7 +1312,7 @@
<para> <para>
The view <literal>columns</literal> contains information about all The view <literal>columns</literal> contains information about all
table columns (or view columns) in the database. System columns table columns (or view columns) in the database. System columns
(<literal>oid</literal>, etc.) are not included. Only those columns are (<literal>ctid</literal>, etc.) are not included. Only those columns are
shown that the current user has access to (by way of being the shown that the current user has access to (by way of being the
owner or having some privilege). owner or having some privilege).
</para> </para>
......
...@@ -465,7 +465,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</ ...@@ -465,7 +465,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
that the <literal>NEW</literal> row seen by the condition is the current value, that the <literal>NEW</literal> row seen by the condition is the current value,
as possibly modified by earlier triggers. Also, a <literal>BEFORE</literal> as possibly modified by earlier triggers. Also, a <literal>BEFORE</literal>
trigger's <literal>WHEN</literal> condition is not allowed to examine the trigger's <literal>WHEN</literal> condition is not allowed to examine the
system columns of the <literal>NEW</literal> row (such as <literal>oid</literal>), system columns of the <literal>NEW</literal> row (such as <literal>ctid</literal>),
because those won't have been set yet. because those won't have been set yet.
</para> </para>
......
...@@ -551,14 +551,12 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac ...@@ -551,14 +551,12 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
<screen> <screen>
INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable> INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable>
</screen> </screen>
The <replaceable class="parameter">count</replaceable> is the The <replaceable class="parameter">count</replaceable> is the number of
number of rows inserted or updated. If <replaceable rows inserted or updated. <replaceable>oid</replaceable> is always 0 (it
class="parameter">count</replaceable> is exactly one, and the used to be the <acronym>OID</acronym> assigned to the inserted row if
target table has OIDs, then <replaceable <replaceable>rows</replaceable> was exactly one and the target table was
class="parameter">oid</replaceable> is the <acronym>OID</acronym> declared <literal>WITH OIDS</literal> and 0 otherwise, but creating a table
assigned to the inserted row. The single row must have been <literal>WITH OIDS</literal> is not supported anymore).
inserted rather than updated. Otherwise <replaceable
class="parameter">oid</replaceable> is zero.
</para> </para>
<para> <para>
......
...@@ -3794,6 +3794,9 @@ bar ...@@ -3794,6 +3794,9 @@ bar
command. This variable is only guaranteed to be valid until command. This variable is only guaranteed to be valid until
after the result of the next <acronym>SQL</acronym> command has after the result of the next <acronym>SQL</acronym> command has
been displayed. been displayed.
<productname>PostgreSQL</productname> servers since version 12 do not
support OID system columns anymore, thus LASTOID will always be 0
following <command>INSERT</command> when targeting such servers.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete ...@@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete
<para> <para>
If <parameter>colname</parameter> refers to a system column (e.g., If <parameter>colname</parameter> refers to a system column (e.g.,
<literal>oid</literal>) then the appropriate negative column number will <literal>ctid</literal>) then the appropriate negative column number will
be returned. The caller should be careful to test the return value be returned. The caller should be careful to test the return value
for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to
detect an error; testing the result for less than or equal to 0 is detect an error; testing the result for less than or equal to 0 is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment