Contents
shobj_description()
A function returning a shared object's comment
shobj_description()
is a system function returning the comment for a shared object
shobj_description()
was added in PostgreSQL 8.2.
Usage
shobj_description ( object oid, catalog name ) → text
Given an OID and the name of the appropriate system catalog table, shobj_description()
returns the comment for the shared object (as defined by COMMENT ON
), or NULL
if no comment has been specified.
Change history
- PostgreSQL 8.2
- added (commit f9a726aa)
Examples
postgres=# COMMENT ON TABLESPACE tblspc_2 IS 'Store a few of the things'; COMMENT postgres=# SELECT shobj_description( (SELECT oid FROM pg_tablespace WHERE spcname = 'tblspc_2'), 'pg_tablespace'); shobj_description --------------------------- Store a few of the things (1 row)
References
- PostgreSQL documentation: Comment Information Functions