All Products
Search
Document Center

PolarDB:USER_CONSTRAINTS

Last Updated:Mar 28, 2026

USER_CONSTRAINTS lists all constraints on tables owned by the current user.

Column reference

ColumnTypeDescription
ownerTEXTThe owner of the constraint.
schema_nameTEXTThe schema to which the constraint belongs.
constraint_nameTEXTThe name of the constraint.
constraint_typeTEXTThe type of the constraint. See Constraint types.
table_nameTEXTThe table to which the constraint belongs.
search_conditionTEXTThe search condition for a check constraint.
r_ownerTEXTThe owner of the table referenced by a referential constraint.
r_constraint_nameTEXTThe name of the constraint defined on the referenced table.
delete_ruleTEXTThe delete rule for a referential constraint. See Delete rules.
deferrableBOOLEANSpecifies whether the constraint is deferrable. Valid values: T and F.
deferredBOOLEANSpecifies whether the constraint is currently deferred. Valid values: T and F.
index_ownerTEXTThe owner of the index associated with the constraint.
index_nameTEXTThe name of the index associated with the constraint.
constraint_defTEXTThe definition of the constraint.

Constraint types

The constraint_type column uses the following values:

  • C: check constraint

  • F: foreign key constraint

  • P: primary key constraint

  • U: unique key constraint

  • R: referential integrity constraint

  • V: constraint on a view

  • O: read-only property on a view

Delete rules

The delete_rule column applies to referential constraints and uses the following values:

  • C: cascade

  • R: restrict

  • N: no action