postgresql_16:3.6.26.6 Comment Information Functions
PostgreSQL 16 > The SQL Language > Functions and Operators > System Information Functions and Operators > Comment Information Functions
The functions shown in (see functions-info-comment-table) extract comments previously stored with the (see postgresql_16:7.1.50) command. A null value is returned if no comment could be found for the specified parameters.
| Function Description | | --- | | col_description ( table oid, column integer ) text Returns the comment for a table column, which is specified by the OID of its table and its column number. (obj_description cannot be used for table columns, since columns do not have OIDs of their own.) | | obj_description ( object oid, catalog name ) text Returns the comment for a database object specified by its OID and the name of the containing system catalog. For example, obj_description(123456, 'pg_class') would retrieve the comment for the table with OID 123456. | | obj_description ( object oid ) text Returns the comment for a database object specified by its OID alone. This is *deprecated* since there is no guarantee that OIDs are unique across different system catalogs; therefore, the wrong comment might be returned. | | shobj_description ( object oid, catalog name ) text Returns the comment for a shared database object specified by its OID and the name of the containing system catalog. This is just like obj_description except that it is used for retrieving comments on shared objects (that is, databases, roles, and tablespaces). Some system catalogs are global to all databases within each cluster, and the descriptions for objects in them are stored globally as well. |