Re: Dependency / Constraint patch - Mailing list pgsql-patches

From Stephan Szabo
Subject Re: Dependency / Constraint patch
Date
Msg-id 20020619072737.E74146-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Dependency / Constraint patch  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-patches
On Wed, 19 Jun 2002, Christopher Kings-Lynne wrote:

> Hi Rod,
>
> If you break out the following two patch items:
>
> > > - psql displays foreign keys (\d output)
> > > - Foreign key triggers are autonamed based on the constraint name
>
> I'm sure that part of the patch will get committed (so long as it's good),
> as we'd agreed already to come up with such a patch (except I never got
> around to it).  Have you also modified psql to NOT dump all those hundreds
> of constraint triggers and show proper FK's instead?  Make it show normal
> triggers and foreign keys as separate things...
>
> > > - pg_dump uses ALTER TABLE / ADD FOREIGN KEY
>
> The item above is trouble because it makes adding foreign keys from dumps
> very slow on large tables.  The advantage of the CREATE CONSRAINT TRIGGER
> approach is that it doesn't actually _check_ the constraint.
>
> My earlier suggestion was to create a 'SET CONSTRAINTS UNCHECKED;' sort of
> transaction-only function that would make ADD FOREIGN KEY _not_ check
> constraints.  I can't remember what the repsonse to that was, but we need
> something...

If it only affects ALTER TABLE / ADD FOREIGN KEY, I think it's a good
idea.  I don't think we should do a general unchecked however.




pgsql-patches by date:

Previous
From: "Rod Taylor"
Date:
Subject: Re: Dependency / Constraint patch
Next
From: "Dave Page"
Date:
Subject: FW: CREATE LANGUAGE/pg_language docs