>> I need to enumerate the constraints on any given column in a table, so
>> I'm examining pg_constraint to get the relevant information. The
>> conkey array contains a list of constrained columns, and although I am
>> able to check conkey[1] for constraints on a single column, I would
>> like to properly handle multi-column constraints.
>
>You may have an easier time dealing with pg_get_constraintdef() than
>trying to get the info from the source.
Is pg_get_constraintdef() documented somewhere? I'd like to know it's
arguments, return format, and whether it will be supported in future
postgres releases.
From what I see in pg_dump.c, it appears to accept an oid from the
pg_constraint table, and only work with foreign key constraints.
True? That might be useful in some special-case code, but I really
want a method that will work with all types of constraint. (The idea
here is to enumerate all constraints on a table, along with their
names, types, and constrained columns.)