pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedReferential constraints in version 8
3+ messages / 3 participants
[nested] [flat]
* Referential constraints in version 8
@ 2005-04-15 07:31 Bob Smith <bsmith@h-e.com>
2005-04-15 12:45 ` Re: Referential constraints in version 8 Alvaro Herrera <alvherre@dcc.uchile.cl>
2005-04-15 13:38 ` Re: Referential constraints in version 8 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Bob Smith @ 2005-04-15 07:31 UTC (permalink / raw)
To: pgsql-admin
We have just finished upgrading Postgres from 7.2 to 8, and I must live
right or something because there was only one glitch. When the dump
from 7.2 was restored into 8, some foreign key references which should
have been initially deferred had become non-deferrable. I had to
re-define those references by dropping the corresponding triggers and
using ALTER TABLE to put them back as foreign key constraints, which
seems to have fixed the problem. However, those references which I
re-defined now show up explicitly in the table descriptions as foreign
key constraints, and the corresponding triggers are not listed. This
is great since it makes the table descriptions much more intelligible,
but my concern is that all the other references which I didn't
re-define still show as triggers and not as foreign key constraints.
Is this just a cosmetic issue with psql's table description, or is
there actually a functional difference? Should I re-define all the
other foreign key constraints to be safe?
Thanks!
Bob Smith
Hammett & Edison, Inc.
bsmith@h-e.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Referential constraints in version 8
2005-04-15 07:31 Referential constraints in version 8 Bob Smith <bsmith@h-e.com>
@ 2005-04-15 12:45 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
1 sibling, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2005-04-15 12:45 UTC (permalink / raw)
To: Bob Smith <bsmith@h-e.com>; +Cc: pgsql-admin
On Fri, Apr 15, 2005 at 12:31:28AM -0700, Bob Smith wrote:
> We have just finished upgrading Postgres from 7.2 to 8, and I must live
> right or something because there was only one glitch. When the dump
> from 7.2 was restored into 8, some foreign key references which should
> have been initially deferred had become non-deferrable. I had to
> re-define those references by dropping the corresponding triggers and
> using ALTER TABLE to put them back as foreign key constraints, which
> seems to have fixed the problem. However, those references which I
> re-defined now show up explicitly in the table descriptions as foreign
> key constraints, and the corresponding triggers are not listed. This
> is great since it makes the table descriptions much more intelligible,
> but my concern is that all the other references which I didn't
> re-define still show as triggers and not as foreign key constraints.
> Is this just a cosmetic issue with psql's table description, or is
> there actually a functional difference? Should I re-define all the
> other foreign key constraints to be safe?
I suggest you run contrib/adddepend against that database. It will try to
add the missing information to the system catalogs so that the FKs
appear as such and not triggers.
--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Uno puede defenderse de los ataques; contra los elogios se esta indefenso"
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Referential constraints in version 8
2005-04-15 07:31 Referential constraints in version 8 Bob Smith <bsmith@h-e.com>
@ 2005-04-15 13:38 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2005-04-15 13:38 UTC (permalink / raw)
To: Bob Smith <bsmith@h-e.com>; +Cc: pgsql-admin
Bob Smith <bsmith@h-e.com> writes:
> We have just finished upgrading Postgres from 7.2 to 8, and I must live
> right or something because there was only one glitch. When the dump
> from 7.2 was restored into 8, some foreign key references which should
> have been initially deferred had become non-deferrable. I had to
> re-define those references by dropping the corresponding triggers and
> using ALTER TABLE to put them back as foreign key constraints, which
> seems to have fixed the problem. However, those references which I
> re-defined now show up explicitly in the table descriptions as foreign
> key constraints, and the corresponding triggers are not listed. This
> is great since it makes the table descriptions much more intelligible,
> but my concern is that all the other references which I didn't
> re-define still show as triggers and not as foreign key constraints.
> Is this just a cosmetic issue with psql's table description, or is
> there actually a functional difference? Should I re-define all the
> other foreign key constraints to be safe?
Yeah, you should --- if it shows as a trigger then the system hasn't
fully grokked it. The contrib/adddepend script may help you.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-04-15 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-15 07:31 Referential constraints in version 8 Bob Smith <bsmith@h-e.com>
2005-04-15 12:45 ` Alvaro Herrera <alvherre@dcc.uchile.cl>
2005-04-15 13:38 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox