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

From Christopher Kings-Lynne
Subject Re: pg_dump: use ALTER TABLE for PKs
Date
Msg-id GNELIHDDFBOCMGBFGEFOAEHECBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to pg_dump: use ALTER TABLE for PKs  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-hackers
I tried going patch <pg_dump_pk.patch in the root dir of latest pgsql cvs
and got this:

Hmm...  Looks like a context diff to me...
The text leading up to this was:
--------------------------
|*** ./src/bin/pg_dump/pg_dump.c.orig   Mon Feb 18 20:17:59 2002
|--- ./src/bin/pg_dump/pg_dump.c        Mon Feb 18 21:16:37 2002
--------------------------
Patching file ./src/bin/pg_dump/pg_dump.c using Plan A...
Hunk #1 failed at 4251.
Hunk #2 failed at 4261.
(Fascinating--this is really a new-style context diff but without
the telltale extra asterisks on the *** line that usually indicate
the new style...)
Hunk #3 failed at 4454.
3 out of 3 hunks failed--saving rejects to ./src/bin/pg_dump/pg_dump.c.rej
done

How should I apply this patch?

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Neil Conway
> Sent: Tuesday, 19 February 2002 10:26 AM
> To: pgsql-hackers@postgresql.org
> Subject: [HACKERS] pg_dump: use ALTER TABLE for PKs
>
>
> 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
>



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pg_dump: use ALTER TABLE for PKs
Next
From: Neil Conway
Date:
Subject: Re: pg_dump: use ALTER TABLE for PKs