aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/catalogs.sgml2
-rw-r--r--doc/src/sgml/ddl.sgml6
-rw-r--r--doc/src/sgml/information_schema.sgml2
-rw-r--r--doc/src/sgml/ref/create_trigger.sgml2
-rw-r--r--doc/src/sgml/ref/insert.sgml14
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml3
-rw-r--r--doc/src/sgml/spi.sgml2
7 files changed, 15 insertions, 16 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 17018637f17..4c7e93892ab 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -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>
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 1fe27c5da9f..cba2ea9b2b7 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -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>
diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index 1321ade44a3..234a3bb6d13 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -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>
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index 6456105de61..3339a4b4e16 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -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>
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 62e142fd8ef..189ce2a0caa 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -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>
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index d5441a9e411..b86764003d3 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -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>
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index 9b2f5169421..66eced6c949 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -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