pg_dump: use ALTER TABLE for PKs - Mailing list pgsql-hackers

From Neil Conway
Subject pg_dump: use ALTER TABLE for PKs
Date
Msg-id 1014085565.372.8.camel@jiro
Whole thread Raw
Responses Re: pg_dump: use ALTER TABLE for PKs  (Peter Eisentraut <peter_e@gmx.net>)
Re: pg_dump: use ALTER TABLE for PKs  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Re: pg_dump: use ALTER TABLE for PKs  (Philip Warner <pjw@rhyme.com.au>)
Re: pg_dump: use ALTER TABLE for PKs  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
I've attached a patch which enhances pg_dump to use ALTER TABLE when
defining the primary keys of a table (instead of including this
information in the table definition).

This follows a suggestion by Christopher Kings-Lynne (good idea!).

The patch is pretty simple, partly because the code was already there,
just commented out ;-) I fixed a typo and added some comments.

Bruce suggested that this should get some code review, since a bug in
pg_dump would be bad news. Any comments would be welcome.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Attachment

pgsql-hackers by date:

Previous
From: Samik Raychaudhuri
Date:
Subject: Selectively compile psql
Next
From: Neil Conway
Date:
Subject: Re: pg_dump: use ALTER TABLE for PKs