postgresql_16:3.6.26.5 Object Information and Addressing Functions
PostgreSQL 16 > The SQL Language > Functions and Operators > System Information Functions and Operators > Object Information and Addressing Functions
(see functions-info-object-table) lists functions related to database object identification and addressing.
| Function Description | | --- | | pg_describe_object ( classid oid, objid oid, objsubid integer ) text Returns a textual description of a database object identified by catalog OID, object OID, and sub-object ID (such as a column number within a table; the sub-object ID is zero when referring to a whole object). This description is intended to be human-readable, and might be translated, depending on server configuration. This is especially useful to determine the identity of an object referenced in the pg_depend catalog. This function returns NULL values for undefined objects. | | pg_identify_object ( classid oid, objid oid, objsubid integer ) record ( type text, schema text, name text, identity text ) Returns a row containing enough information to uniquely identify the database object specified by catalog OID, object OID and sub-object ID. This information is intended to be machine-readable, and is never translated. type identifies the type of database object; schema is the schema name that the object belongs in, or NULL for object types that do not belong to schemas; name is the name of the object, quoted if necessary, if the name (along with schema name, if pertinent) is sufficient to uniquely identify the object, otherwise NULL; identity is the complete object identity, with the precise format depending on object type, and each name within the format being schema-qualified and quoted as necessary. Undefined objects are identified with NULL values. | | pg_identify_object_as_address ( classid oid, objid oid, objsubid integer ) record ( type text, object_names text[], object_args text[] ) Returns a row containing enough information to uniquely identify the database object specified by catalog OID, object OID and sub-object ID. The returned information is independent of the current server, that is, it could be used to identify an identically named object in another server. type identifies the type of database object; object_names and object_args are text arrays that together form a reference to the object. These three values can be passed to pg_get_object_address to obtain the internal address of the object. | | pg_get_object_address ( type text, object_names text[], object_args text[] ) record ( classid oid, objid oid, objsubid integer ) Returns a row containing enough information to uniquely identify the database object specified by a type code and object name and argument arrays. The returned values are the ones that would be used in system catalogs such as pg_depend; they can be passed to other system functions such as pg_describe_object or pg_identify_object. classid is the OID of the system catalog containing the object; objid is the OID of the object itself, and objsubid is the sub-object ID, or zero if none. This function is the inverse of pg_identify_object_as_address. Undefined objects are identified with NULL values. |