Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6b3917

Browse files
committed
docs: cleanup/remove/update references to OID column.
I (Andres) missed these in578b229.Author: Justin Pryzby, editorialized a bit by Andres FreundReviewed-By: Daniel Verite, Andres FreundDiscussion:https://postgr.es/m/20190408002847.GA904@telsasoft.com
1 parent421a2c4 commitf6b3917

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

‎doc/src/sgml/catalogs.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@
10471047
<entry></entry>
10481048
<entry>
10491049
The number of the column. Ordinary columns are numbered from 1
1050-
up. System columns, such as <structfield>oid</structfield>,
1050+
up. System columns, such as <structfield>ctid</structfield>,
10511051
have (arbitrary) negative numbers.
10521052
</entry>
10531053
</row>

‎doc/src/sgml/ddl.sgml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,8 +1202,7 @@ CREATE TABLE circles (
12021202
<structfield>ctid</structfield> will change if it is
12031203
updated or moved by <command>VACUUM FULL</command>. Therefore
12041204
<structfield>ctid</structfield> is useless as a long-term row
1205-
identifier. The OID, or even better a user-defined serial
1206-
number, should be used to identify logical rows.
1205+
identifier. A primary key should be used to identify logical rows.
12071206
</para>
12081207
</listitem>
12091208
</varlistentry>
@@ -3675,8 +3674,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
36753674
<command>CREATE TABLE</command>, nor is it possible to add columns to
36763675
partitions after-the-fact using <command>ALTER TABLE</command>. Tables may be
36773676
added as a partition with <command>ALTER TABLE ... ATTACH PARTITION</command>
3678-
only if their columns exactly match the parent, including any
3679-
<literal>oid</literal> column.
3677+
only if their columns exactly match the parent.
36803678
</para>
36813679
</listitem>
36823680

‎doc/src/sgml/information_schema.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@
13121312
<para>
13131313
The view <literal>columns</literal> contains information about all
13141314
table columns (or view columns) in the database. System columns
1315-
(<literal>oid</literal>, etc.) are not included. Only those columns are
1315+
(<literal>ctid</literal>, etc.) are not included. Only those columns are
13161316
shown that the current user has access to (by way of being the
13171317
owner or having some privilege).
13181318
</para>

‎doc/src/sgml/ref/create_trigger.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
465465
that the <literal>NEW</literal> row seen by the condition is the current value,
466466
as possibly modified by earlier triggers. Also, a <literal>BEFORE</literal>
467467
trigger's <literal>WHEN</literal> condition is not allowed to examine the
468-
system columns of the <literal>NEW</literal> row (such as <literal>oid</literal>),
468+
system columns of the <literal>NEW</literal> row (such as <literal>ctid</literal>),
469469
because those won't have been set yet.
470470
</para>
471471

‎doc/src/sgml/ref/insert.sgml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -551,14 +551,12 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
551551
<screen>
552552
INSERT <replaceable>oid</replaceable> <replaceable class="parameter">count</replaceable>
553553
</screen>
554-
The <replaceable class="parameter">count</replaceable> is the
555-
number of rows inserted or updated. If <replaceable
556-
class="parameter">count</replaceable> is exactly one, and the
557-
target table has OIDs, then <replaceable
558-
class="parameter">oid</replaceable> is the <acronym>OID</acronym>
559-
assigned to the inserted row. The single row must have been
560-
inserted rather than updated. Otherwise <replaceable
561-
class="parameter">oid</replaceable> is zero.
554+
The <replaceable class="parameter">count</replaceable> is the number of
555+
rows inserted or updated. <replaceable>oid</replaceable> is always 0 (it
556+
used to be the <acronym>OID</acronym> assigned to the inserted row if
557+
<replaceable>rows</replaceable> was exactly one and the target table was
558+
declared <literal>WITH OIDS</literal> and 0 otherwise, but creating a table
559+
<literal>WITH OIDS</literal> is not supported anymore).
562560
</para>
563561

564562
<para>

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3794,6 +3794,9 @@ bar
37943794
command. This variable is only guaranteed to be valid until
37953795
after the result of the next <acronym>SQL</acronym> command has
37963796
been displayed.
3797+
<productname>PostgreSQL</productname> servers since version 12 do not
3798+
support OID system columns anymore, thus LASTOID will always be 0
3799+
following <command>INSERT</command> when targeting such servers.
37973800
</para>
37983801
</listitem>
37993802
</varlistentry>

‎doc/src/sgml/spi.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc <parameter>rowdesc</parameter>, const char * <paramete
31053105

31063106
<para>
31073107
If <parameter>colname</parameter> refers to a system column (e.g.,
3108-
<literal>oid</literal>) then the appropriate negative column number will
3108+
<literal>ctid</literal>) then the appropriate negative column number will
31093109
be returned. The caller should be careful to test the return value
31103110
for exact equality to <symbol>SPI_ERROR_NOATTRIBUTE</symbol> to
31113111
detect an error; testing the result for less than or equal to 0 is

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp