docs: cleanup/remove/update references to OID column.
authorAndres Freund
Thu, 18 Apr 2019 00:22:56 +0000 (17:22 -0700)
committerAndres Freund
Thu, 18 Apr 2019 00:22:56 +0000 (17:22 -0700)
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[email protected]

doc/src/sgml/catalogs.sgml
doc/src/sgml/ddl.sgml
doc/src/sgml/information_schema.sgml
doc/src/sgml/ref/create_trigger.sgml
doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/spi.sgml

index 17018637f1720b7ccdcb3f2bed3116c26e173e33..4c7e93892ab2d57ed0c5facef44a6874f12a943a 100644 (file)
       
       
        The number of the column.  Ordinary columns are numbered from 1
-       up.  System columns, such as oid,
+       up.  System columns, such as ctid,
        have (arbitrary) negative numbers.
       
      
index 1fe27c5da9f5c371e585750a4867279fad35bc1c..cba2ea9b2b7409207233591a3825e7e844eb3b10 100644 (file)
@@ -1202,8 +1202,7 @@ CREATE TABLE circles (
       ctid will change if it is
       updated or moved by VACUUM FULL.  Therefore
       ctid 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.
      
     
    
@@ -3675,8 +3674,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
        CREATE TABLE, nor is it possible to add columns to
        partitions after-the-fact using ALTER TABLE.  Tables may be
        added as a partition with ALTER TABLE ... ATTACH PARTITION
-       only if their columns exactly match the parent, including any
-       oid column.
+       only if their columns exactly match the parent.
       
      
 
index 1321ade44a3a6c6603864f80410b57c2bb52d79e..234a3bb6d13583526a8a01dcfbd4b1e2fc49f88c 100644 (file)
   
    The view columns contains information about all
    table columns (or view columns) in the database.  System columns
-   (oid, etc.) are not included.  Only those columns are
+   (ctid, 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).
   
index 6456105de61d826d680cc869f1f2a9b849ec5510..3339a4b4e16a6e7f63330bbf4bc6e728f29e2b3e 100644 (file)
@@ -465,7 +465,7 @@ UPDATE OF column_name1 [, column_name2
    that the NEW row seen by the condition is the current value,
    as possibly modified by earlier triggers.  Also, a BEFORE
    trigger's WHEN condition is not allowed to examine the
-   system columns of the NEW row (such as oid),
+   system columns of the NEW row (such as ctid),
    because those won't have been set yet.
   
 
index 62e142fd8efc7977044d3aeba3e49ceb93f9607f..189ce2a0caa1f1942a47ee0bf07398e0d6393668 100644 (file)
@@ -551,14 +551,12 @@ INSERT INTO table_name [ AS 
 
 INSERT oid count
 
-   The count is the
-   number of rows inserted or updated.  If 
-   class="parameter">count is exactly one, and the
-   target table has OIDs, then 
-   class="parameter">oid is the OID
-   assigned to the inserted row.  The single row must have been
-   inserted rather than updated.  Otherwise 
-   class="parameter">oid is zero.
+   The count is the number of
+   rows inserted or updated.  oid is always 0 (it
+   used to be the OID assigned to the inserted row if
+   rows was exactly one and the target table was
+   declared WITH OIDS and 0 otherwise, but creating a table
+   WITH OIDS is not supported anymore).
   
 
   
index d5441a9e4115bdc27e99c75507695f1efd377215..b86764003d3d1ca595500df24d84eb85f3cac49a 100644 (file)
@@ -3794,6 +3794,9 @@ bar
         command. This variable is only guaranteed to be valid until
         after the result of the next SQL command has
         been displayed.
+        PostgreSQL servers since version 12 do not
+        support OID system columns anymore, thus LASTOID will always be 0
+        following INSERT when targeting such servers.
         
         
       
index 9b2f51694217c9838134305348073870b6628240..66eced6c949087b4ebf68ddad66060f1ae292592 100644 (file)
@@ -3105,7 +3105,7 @@ int SPI_fnumber(TupleDesc rowdesc, const char * 
 
   
    If colname refers to a system column (e.g.,
-   oid) then the appropriate negative column number will
+   ctid) then the appropriate negative column number will
    be returned.  The caller should be careful to test the return value
    for exact equality to SPI_ERROR_NOATTRIBUTE to
    detect an error; testing the result for less than or equal to 0 is