The catalog pg_constraint stores
check, primary key, unique, and foreign key constraints on
tables. (Column constraints are not treated specially. Every
column constraint is equivalent to some table constraint.)
Not-null constraints are represented in the pg_attribute catalog.

If a check constraint, a human-readable
representation of the expression

Note:consrc is not
updated when referenced objects change; for example, it won't
track renaming of columns. Rather than relying on this field,
it's best to use pg_get_constraintdef() to extract the
definition of a check constraint.

Note:pg_class.relchecks
needs to agree with the number of check-constraint entries
found in this table for the given relation.