Cloud

pg_get_constraintdef

The pg_get_constraintdef() is a system catalog information function that retrieves the definition of a specific constraint in a human-readable format.

Syntax

pg_get_constraintdef (constraint_oid [, pretty_bool]) → NULL

Parameters

  • constraint_oid: Specifies the object identifier (OID) of the constraint to retrieve the definition for.

  • pretty_bool: Controls whether to format the output in a human-readable way.

Restrictions

  • This implementation returns NULL when the constraint_oid parameter is NULL.