Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE> writes:
> I would myself be interested to see how the check constraints are stored,
> so I can put this into the psql \d command.
You want the rcsrc column of pg_relcheck. See getTables() in pg_dump.c
for an example of retrieving constraint conditions.
IIRC, specialized constraints such as NOT NULL are recorded someplace
else, but you probably know about those already.
regards, tom lane