top of page
Shareware software
A check constraint is the most common type of constraint. In its definition, you can specify that the value of the given column must satisfy a boolean expression (truth test)

SELECT r.oid,
r.conname,
pg_catalog.pg_get_constraintdef(r.oid, true)
"pg_get_constraintdef"
FROM pg_catalog.pg_constraint r
WHERE r.conrelid = $$TABLEOID
AND r.contype = 'c'
ORDER BY 1
bottom of page