doc: Update documentation about reg* types
authorPeter Eisentraut
Wed, 18 Mar 2020 13:51:37 +0000 (14:51 +0100)
committerPeter Eisentraut
Wed, 18 Mar 2020 13:54:29 +0000 (14:54 +0100)
Add missing index entries, add missing information on pg_upgrade man
page, order things alphabetical instead of (apparently) in the order
they were implemented, reduce repetitiveness a bit.

doc/src/sgml/datatype.sgml
doc/src/sgml/func.sgml
doc/src/sgml/ref/pgupgrade.sgml

index 410eaedcb7f78be8dc044002db7f794cc3760a09..157fe4e72759fae7d5774bfe4909302fa00db5e3 100644 (file)
@@ -4473,39 +4473,43 @@ INSERT INTO mytable VALUES(-1);  -- fails
    
 
    
-    regproc
+    regclass
    
 
    
-    regprocedure
+    regconfig
    
 
    
-    regoper
+    regdictionary
    
 
    
-    regoperator
+    regnamespace
    
 
    
-    regclass
+    regoper
    
 
    
-    regtype
+    regoperator
    
 
    
-    regconfig
+    regproc
    
 
    
-    regdictionary
+    regprocedure
    
 
    
-    xid
+    regrole
+   
+
+   
+    regtype
    
 
    
@@ -4516,17 +4520,17 @@ INSERT INTO mytable VALUES(-1);  -- fails
     tid
    
 
+   
+    xid
+   
+
    
     Object identifiers (OIDs) are used internally by
     PostgreSQL as primary keys for various
     system tables.
-
     Type oid represents an object identifier.  There are also
-    several alias types for oidregproc,
-    regprocedureregoperregoperator,
-    regclassregtyperegrole,
-    regnamespaceregconfig, and
-    regdictionary.   shows an
+    several alias types for oid named regsomething.
+     shows an
     overview.
    
 
@@ -4592,17 +4596,32 @@ SELECT * FROM pg_attribute
        
 
        
-        regproc
-        pg_proc
-        function name
-        sum
+        regclass
+        pg_class
+        relation name
+        pg_type
        
 
+
        
-        regprocedure
-        pg_proc
-        function with argument types
-        sum(int4)
+        regconfig
+        pg_ts_config
+        text search configuration
+        english
+       
+
+       
+        regdictionary
+        pg_ts_dict
+        text search dictionary
+        simple
+       
+
+       
+        regnamespace
+        pg_namespace
+        namespace name
+        pg_catalog
        
 
        
@@ -4620,17 +4639,17 @@ SELECT * FROM pg_attribute
        
 
        
-        regclass
-        pg_class
-        relation name
-        pg_type
+        regproc
+        pg_proc
+        function name
+        sum
        
 
        
-        regtype
-        pg_type
-        data type name
-        integer
+        regprocedure
+        pg_proc
+        function with argument types
+        sum(int4)
        
 
        
@@ -4641,24 +4660,10 @@ SELECT * FROM pg_attribute
        
 
        
-        regnamespace
-        pg_namespace
-        namespace name
-        pg_catalog
-       
-
-       
-        regconfig
-        pg_ts_config
-        text search configuration
-        english
-       
-
-       
-        regdictionary
-        pg_ts_dict
-        text search dictionary
-        simple
+        regtype
+        pg_type
+        data type name
+        integer
        
       
      
index fc4d7f0f787ff6282fb17edd58462a742c924aff..2a8683a734746d979a30f6c2bb6dffc7bd38b13c 100644 (file)
@@ -18178,11 +18178,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
    
 
    
-    to_regproc
+    to_regnamespace
    
 
    
-    to_regprocedure
+    to_regrole
    
 
    
@@ -18194,15 +18194,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
    
 
    
-    to_regtype
+    to_regproc
    
 
    
-    to_regnamespace
+    to_regprocedure
    
 
    
-    to_regrole
+    to_regtype
    
 
   
@@ -18390,14 +18390,9 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
        get the OID of the named relation
       
       
-       to_regproc(func_name)
-       regproc
-       get the OID of the named function
-      
-      
-       to_regprocedure(func_name)
-       regprocedure
-       get the OID of the named function
+       to_regnamespace(schema_name)
+       regnamespace
+       get the OID of the named schema
       
       
        to_regoper(operator_name)
@@ -18410,19 +18405,24 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
        get the OID of the named operator
       
       
-       to_regtype(type_name)
-       regtype
-       get the OID of the named type
+       to_regrole(role_name)
+       regrole
+       get the OID of the named role
       
       
-       to_regnamespace(schema_name)
-       regnamespace
-       get the OID of the named schema
+       to_regproc(func_name)
+       regproc
+       get the OID of the named function
       
       
-       to_regrole(role_name)
-       regrole
-       get the OID of the named role
+       to_regprocedure(func_name)
+       regprocedure
+       get the OID of the named function
+      
+      
+       to_regtype(type_name)
+       regtype
+       get the OID of the named type
       
      
     
@@ -18720,20 +18720,18 @@ SELECT collation for ('foo' COLLATE "de_DE");
   
 
   
-   The to_regclassto_regproc,
-   to_regprocedureto_regoper,
-   to_regoperatorto_regtype,
-   to_regnamespace, and to_regrole
-   functions translate relation, function, operator, type, schema, and role
-   names (given as text) to objects of
-   type regclassregprocregprocedure,
-   regoperregoperatorregtype,
-   regnamespace, and regrole
-   respectively.  These functions differ from a cast from
-   text in that they don't accept a numeric OID, and that they return null
-   rather than throwing an error if the name is not found (or, for
-   to_regproc and to_regoper, if
-   the given name matches multiple objects).
+   The functions to_regclass,
+   to_regnamespaceto_regoper,
+   to_regoperatorto_regrole,
+   to_regprocto_regprocedure, and
+   to_regtype, functions translate relation, schema,
+   operator, role, function, and type names (given as text) to
+   objects of the corresponding reg* type (see 
+   linkend="datatype-oid"/> about the types).  These functions differ from a
+   cast from text in that they don't accept a numeric OID, and that they
+   return null rather than throwing an error if the name is not found (or, for
+   to_regproc and to_regoper, if the
+   given name matches multiple objects).
   
 
    
index 6629d736b83412da3a676c6fca65520abb2287f1..9e4b2d69a4da8d2eb49e3960cf5965046e108b00 100644 (file)
@@ -773,9 +773,16 @@ psql --username=postgres --file=script.sql postgres
   
    pg_upgrade does not support upgrading of databases
    containing table columns using these reg* OID-referencing system data types:
-   regprocregprocedureregoper,
-   regoperatorregconfig, and
-   regdictionary.  (regtype can be upgraded.)
+   
+    regconfig
+    regdictionary
+    regnamespace
+    regoper
+    regoperator
+    regproc
+    regprocedure
+   
+   (regclassregrole, and regtype can be upgraded.)