In terms of making constraints more declarative, I think it would be neat to add an extra field to pg_relcheck that is a foreign key (or null) into the pg_attribute table. That way, it would be possible to recover column CHECK constraints. If the field is NULL, you'd assume it was a table CHECK constraint... Theoretically, it would mean that less information is 'lost' after the table creation. Chris