mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
docs: cleanup/remove/update references to OID column.
I (Andres) missed these in 578b229718e8f. Author: Justin Pryzby, editorialized a bit by Andres Freund Reviewed-By: Daniel Verite, Andres Freund Discussion: https://postgr.es/m/20190408002847.GA904@telsasoft.com
This commit is contained in:
parent
421a2c4832
commit
f6b39171f3
@ -1047,7 +1047,7 @@
|
||||
<entry></entry>
|
||||
<entry>
|
||||
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.
|
||||
</entry>
|
||||
</row>
|
||||
|
@ -1202,8 +1202,7 @@ CREATE TABLE circles (
|
||||
<structfield>ctid</structfield> will change if it is
|
||||
updated or moved by <command>VACUUM FULL</command>. Therefore
|
||||
<structfield>ctid</structfield> is useless as a long-term row
|
||||
identifier. The OID, or even better a user-defined serial
|
||||
number, should be used to identify logical rows.
|
||||
identifier. A primary key should be used to identify logical rows.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@ -3675,8 +3674,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
|
||||
<command>CREATE TABLE</command>, nor is it possible to add columns to
|
||||
partitions after-the-fact using <command>ALTER TABLE</command>. Tables may be
|
||||
added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
|
||||
only if their columns exactly match the parent, including any
|
||||
<literal>oid</literal> column.
|
||||
only if their columns exactly match the parent.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -1312,7 +1312,7 @@
|
||||
<para>
|
||||
The view <literal>columns</literal> contains information about all
|
||||
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
|
||||
owner or having some privilege).
|
||||
</para>
|
||||
|
@ -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,
|
||||
as possibly modified by earlier triggers. Also, a <literal>BEFORE</literal>
|
||||
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.
|
||||
</para>
|
||||
|
||||
|
@ -551,14 +551,12 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
|
||||
<screen>
|
||||
INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable>
|
||||
</screen>
|
||||
The <replaceable class="parameter">count</replaceable> is the
|
||||
number of rows inserted or updated. If <replaceable
|
||||
class="parameter">count</replaceable> is exactly one, and the
|
||||
target table has OIDs, then <replaceable
|
||||
class="parameter">oid</replaceable> is the <acronym>OID</acronym>
|
||||
assigned to the inserted row. The single row must have been
|
||||
inserted rather than updated. Otherwise <replaceable
|
||||
class="parameter">oid</replaceable> is zero.
|
||||
The <replaceable class="parameter">count</replaceable> is the number of
|
||||
rows inserted or updated. <replaceable>oid</replaceable> is always 0 (it
|
||||
used to be the <acronym>OID</acronym> assigned to the inserted row if
|
||||
<replaceable>rows</replaceable> was exactly one and the target table was
|
||||
declared <literal>WITH OIDS</literal> and 0 otherwise, but creating a table
|
||||
<literal>WITH OIDS</literal> is not supported anymore).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
@ -3794,6 +3794,9 @@ bar
|
||||
command. This variable is only guaranteed to be valid until
|
||||
after the result of the next <acronym>SQL</acronym> command has
|
||||
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>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete
|
||||
|
||||
<para>
|
||||
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
|
||||
for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to
|
||||
detect an error; testing the result for less than or equal to 0 is
|
||||
|
Loading…
x
Reference in New Issue
Block a user