top of page
Волнистый абстрактный фон
CerebroSQL

PostgreSQL constraint-check

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)

PostgreSQL table check

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