Re: pg_dump: use ALTER TABLE for PKs

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Neil Conway" <nconway(at)klamath(dot)dyndns(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump: use ALTER TABLE for PKs
Date: 2002-02-19 03:44:06
Message-ID: GNELIHDDFBOCMGBFGEFOAEHECBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Neil Conway
> Sent: Tuesday, 19 February 2002 10:26 AM
> To: pgsql-hackers(at)postgresql(dot)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(at)rogers(dot)com>
> PGP Key ID: DB3C29FC
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-02-19 03:46:12 Re: pg_dump: use ALTER TABLE for PKs
Previous Message Neil Conway 2002-02-19 03:40:56 Re: pg_dump: use ALTER TABLE for PKs