+
+
+
+
+
+
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.
|
- 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
|
|
- 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)
|
|
- 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
get the OID of the named relation
|
- 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)
get the OID of the named operator
|
- regtype
- get the OID of the named type
+ regrole
+ get the OID of the named role
|
-
to_regnamespace(schema_name)
- regnamespace
- get the OID of the named schema
+ regproc
+ get the OID of the named function
|
- regrole
- get the OID of the named role
+
to_regprocedure(func_name)
+ regprocedure
+ get the OID of the named function
+
+ |
+ regtype
+ get the OID of the named type
- 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
+ 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).
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.)