Hi,
This patch supercedes the previous version. Apply this instead of the
previous version.
This patch makes pg_get_constraintdef support UNIQUE, PRIMARY KEY and CHECK
constraints.
There are apparently no other types of constraint in pg_constraint, so now
all bases are covered. Also, this patch assumes that consrc for a CHECK
constraint is always bracketed so that it's not necessary to add extra
brackets.
Chris