RE: Table/Column Constraints - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject RE: Table/Column Constraints
Date
Msg-id NEBBIOAJBMEENKACLNPCGEIJCCAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Table/Column Constraints  (Philip Warner <pjw@rhyme.com.au>)
Responses RE: Table/Column Constraints  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
> CREATE TABLE example
>  ( example_id  serial
>
>  -- Must be a ZIP or Postal Code
>  , region        varchar(6)
>
>  -- Descriptive text
>  , description varchar(60)
>  );

Actually - this is something I _could_ do.

As the pg_dump is running, it shouldn't be too hard to select the comment
associated with each entity as it is being dumped.  ie.  In the example
above, the comments for each attribute would be retrieved from
pg_description (or whatever) and output as '-- ...' comments.

Then, if the COMMENT ON statements are also still dumped at the bottom, you
get the ability to see comments conveniently in your dump, but with the
ability to still hand-edit them before restoring the dump...

Chris



pgsql-hackers by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Re: RE: [GENERAL] PHPBuilder article -- Postgres vs MySQL
Next
From: Philip Warner
Date:
Subject: RE: Table/Column Constraints