From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Jan Wieck <janwieck(at)yahoo(dot)com> |
Cc: | Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Christof Petig <christof(at)petig-baender(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_dump: Sorted output, referential integrity |
Date: | 2001-12-11 18:30:38 |
Message-ID: | 20011211101646.M79645-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 11 Dec 2001, Jan Wieck wrote:
> Stephan Szabo wrote:
> >
> > On Tue, 11 Dec 2001, Philip Warner wrote:
> >
> > > At 13:34 7/12/01 -0800, Stephan Szabo wrote:
> > > >
> > > >Well, the biggest thing I see on using alter table add constraint for
> > > >foreign keys is the expense involved if you do it after the tables are
> > > >populated.
> > >
> > > Is it really worse than loading the tables with the constraint in place?
> >
> > I'd say its better than while loading, but currently the check isn't
> > performed at all I think, because the create constraint trigger
> > statements are after data load and they don't check the data at all.
> > At least that's how I remember it, I could be wrong.
>
> You're not. This discussion came up a couple of times, and
> the answer is allways the same.
>
> We don't want to define the constraints with ALTER TABLE
> because this means checking data on restore that doesn't need
> to be checked at all (in theory). If he has a crash of a
> critical system and restores from a dump, I bet the farm that
> he wants it FAST.
I'd say as an optional parameter to dump, it's definately not a bad idea
(like the idea of a --sql or whatever) since the user has to explicitly
ask for it. I think for the rest of the cases it comes down to what people
want it to do.
From | Date | Subject | |
---|---|---|---|
Next Message | Serguei Mokhov | 2001-12-11 18:37:03 | Re: Restoring large tables with COPY |
Previous Message | Tom Lane | 2001-12-11 18:06:13 | Re: Restoring large tables with COPY |