diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 410eaedcb7f..157fe4e7275 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -4472,30 +4472,10 @@ INSERT INTO mytable VALUES(-1); -- fails
oid
-
- regproc
-
-
-
- regprocedure
-
-
-
- regoper
-
-
-
- regoperator
-
-
regclass
-
- regtype
-
-
regconfig
@@ -4505,7 +4485,31 @@ INSERT INTO mytable VALUES(-1); -- fails
- xid
+ regnamespace
+
+
+
+ regoper
+
+
+
+ regoperator
+
+
+
+ regproc
+
+
+
+ regprocedure
+
+
+
+ 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 oid: regproc,
- regprocedure, regoper, regoperator,
- regclass, regtype, regrole,
- regnamespace, regconfig, 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
+
+
+
+
+ regconfig
+ pg_ts_config
+ text search configuration
+ english
- regprocedure
- pg_proc
- function with argument types
- sum(int4)
+ 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
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index fc4d7f0f787..2a8683a7347 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -18178,11 +18178,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
- to_regproc
+ to_regnamespace
- to_regprocedure
+ to_regrole
@@ -18193,18 +18193,18 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
to_regoperator
+
+ to_regproc
+
+
+
+ to_regprocedure
+
+
to_regtype
-
- to_regnamespace
-
-
-
- to_regrole
-
-
lists functions that
extract information from the system catalogs.
@@ -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)
@@ -18409,21 +18404,26 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
regoperator
get the OID of the named operator
-
- to_regtype(type_name)
- regtype
- get the OID of the named type
-
-
- to_regnamespace(schema_name)
- regnamespace
- get the OID of the named schema
-
to_regrole(role_name)
regrole
get the OID of the named role
+
+ 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_regtype(type_name)
+ regtype
+ get the OID of the named type
+
@@ -18720,20 +18720,18 @@ SELECT collation for ('foo' COLLATE "de_DE");
- The to_regclass, to_regproc,
- to_regprocedure, to_regoper,
- to_regoperator, to_regtype,
- to_regnamespace, and to_regrole
- functions translate relation, function, operator, type, schema, and role
- names (given as text) to objects of
- type regclass, regproc, regprocedure,
- regoper, regoperator, regtype,
- 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_regnamespace, to_regoper,
+ to_regoperator, to_regrole,
+ to_regproc, to_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 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).
diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml
index 6629d736b83..9e4b2d69a4d 100644
--- a/doc/src/sgml/ref/pgupgrade.sgml
+++ b/doc/src/sgml/ref/pgupgrade.sgml
@@ -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:
- regproc, regprocedure, regoper,
- regoperator, regconfig, and
- regdictionary. (regtype can be upgraded.)
+
+ regconfig
+ regdictionary
+ regnamespace
+ regoper
+ regoperator
+ regproc
+ regprocedure
+
+ (regclass, regrole, and regtype can be upgraded.)