Foreign key in pg_dump / psql

Lists: pgsql-patches
From: Rod Taylor <rbt(at)zort(dot)ca>
To: pgsql-patches(at)postgresql(dot)org
Subject: Foreign key in pg_dump / psql
Date: 2002-08-07 01:17:41
Message-ID: 1028683062.93791.9.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

A couple of bits of the depend/constraint patch that were not applied.

It displays foreign key structure in /d while skipping the triggers that
make up the foreign key.

Dumps foreign keys as alter table statements on >=7.3. Older DBs will
continue to dump triggers (no pg_constraint table).

Attachment Content-Type Size
fkey.patch text/x-patch 16.3 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-14 05:11:06
Message-ID: 200208140511.g7E5B6l00565@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:
> A couple of bits of the depend/constraint patch that were not applied.
>
> It displays foreign key structure in /d while skipping the triggers that
> make up the foreign key.
>
> Dumps foreign keys as alter table statements on >=7.3. Older DBs will
> continue to dump triggers (no pg_constraint table).

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)zort(dot)ca>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-14 14:05:19
Message-ID: 7772.1029333919@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Your patch has been added to the PostgreSQL unapplied patches list at:

>> A couple of bits of the depend/constraint patch that were not applied.

Again, this is code I still gotta review...

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rod Taylor <rbt(at)zort(dot)ca>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-14 17:58:08
Message-ID: 200208141758.g7EHw8l14100@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Your patch has been added to the PostgreSQL unapplied patches list at:
>
> >> A couple of bits of the depend/constraint patch that were not applied.
>
> Again, this is code I still gotta review...

Oh, that one. OK.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Rod Taylor <rbt(at)zort(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-16 19:40:40
Message-ID: 1029526841.29411.12.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Wed, 2002-08-14 at 10:05, Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Your patch has been added to the PostgreSQL unapplied patches list at:
>
> >> A couple of bits of the depend/constraint patch that were not applied.
>
> Again, this is code I still gotta review...

The attached better handles constraint triggers which are not foreign
keys. It helps 7.2.

Is there any reason to create new constraint triggers? Could the
CONSTRAINT clause be removed after a couple of releases?

Attachment Content-Type Size
fkey.patch text/plain 18.5 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-16 19:50:21
Message-ID: 200208161950.g7GJoLn05309@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


[ Tom will review.]

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Rod Taylor wrote:
> On Wed, 2002-08-14 at 10:05, Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > >> A couple of bits of the depend/constraint patch that were not applied.
> >
> > Again, this is code I still gotta review...
>
> The attached better handles constraint triggers which are not foreign
> keys. It helps 7.2.
>
> Is there any reason to create new constraint triggers? Could the
> CONSTRAINT clause be removed after a couple of releases?
>

[ Attachment, skipping... ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-16 20:26:42
Message-ID: 20177.1029529602@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Rod Taylor <rbt(at)zort(dot)ca> writes:
> Is there any reason to create new constraint triggers? Could the
> CONSTRAINT clause be removed after a couple of releases?

Not without breaking existing pg_dump files. It will be many releases
before you will be able to sell that idea...

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key in pg_dump / psql
Date: 2002-08-17 02:14:25
Message-ID: 200208170214.g7H2EPk17744@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Tom has applied this. Thanks.

---------------------------------------------------------------------------

Rod Taylor wrote:
> On Wed, 2002-08-14 at 10:05, Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > >> A couple of bits of the depend/constraint patch that were not applied.
> >
> > Again, this is code I still gotta review...
>
> The attached better handles constraint triggers which are not foreign
> keys. It helps 7.2.
>
> Is there any reason to create new constraint triggers? Could the
> CONSTRAINT clause be removed after a couple of releases?
>

[ Attachment, skipping... ]

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073