Other
pg_get_constraintdef()
Overview
The pg_get_constraintdef() is a system catalog information function that retrieves the definition of a specific constraint in a human-readable format.
Syntax
The syntax for the pg_get_constraintdef()
function is as follows:
pg_get_constraintdef (constraint_oid [, pretty_bool]) → NULL
Parameters
The following parameters are required to execute this function:
- constraint_oid: specifies the object identifier (OID) of the constraint for which you want to retrieve the definition
- pretty_bool: controls whether to format the output in a human-readable way
Restrictions
- This function always returns
NULL
if there are no parameters specified