Skip site navigation (1) Skip section navigation (2)

Re: Dependency / Constraint patch

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Rod Taylor" <rbt(at)zort(dot)ca>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Dependency / Constraint patch
Date: 2002-06-19 08:18:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
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


In response to


pgsql-patches by date

Next:From: Rod TaylorDate: 2002-06-19 11:17:41
Subject: Re: Dependency / Constraint patch
Previous:From: Bruce MomjianDate: 2002-06-19 06:59:02
Subject: Problem with SSL and IPv6

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group