Re: Re: [BUG?] tgconstrrelid doesn't survive a dump/restore

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Joel Burton <jburton(at)scw(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, JanWieck(at)Yahoo(dot)com
Subject: Re: Re: [BUG?] tgconstrrelid doesn't survive a dump/restore
Date: 2001-04-19 13:42:22
Message-ID: 200104191342.IAA01558@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner wrote:
> At 16:25 18/04/01 -0400, Joel Burton wrote:
> >
> >Do we know if the problem is in pg_dump, or is there no way
> >to pass the tgconstrrelid value in the CREATE CONSTRAINT TRIGGER
> >statement?
> >
>
> It's because pg_dump is not designed to dump these constraints *as*
> constraints. We just need to make pg_dump clever enough to do that.

IMHO there's nothing fundamentally wrong with having pg_dump
dumping the constraints as special triggers, because they are
implemented in PostgreSQL as triggers. And the required
feature to correctly restore the tgconstrrelid is already in
the backend, so pg_dump should make use of it (right now,
after a dump/restore, a DROP of a table involved in
referential integrity wouldn't correctly remove the triggers
from the referencing/referenced opposite table(s)).

The advantage of having pg_dump output these constraints as
proper ALTER TABLE commands would only be readability and
easier portability (from PG to another RDBMS).

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-04-19 14:32:21 Re: Re: [BUG?] tgconstrrelid doesn't survive a dump/restore
Previous Message The Hermit Hacker 2001-04-19 12:57:30 idle processes in v7.1 ... not killable?