Cloud

col_description

The col_description() is a comment information function that retrieves the comment associated with a specified table column.

Syntax

The syntax for this function is:

col_description (table_oid, column_number) → text

Parameters

  • table_oid: specifies the object identifier (OID) of the table containing the column from which to retrieve the comment

  • column_number: indicates the ordinal position of the column within the table (starting from 1 for the first column)

It is important to note that the column number must be provided as an object identifier (OID), which can be achieved by casting the table name to regclass

Restrictions

  • This implementation returns NULL when either parameter (table_oid or column_number) is NULL.