Re: ADD/DROP constraints

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ADD/DROP constraints
Date: 2006-06-08 20:43:42
Message-ID: 1149799422.3918.15.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, N, 2006-06-08 kell 16:30, kirjutas Greg Stark:
> On a separate note. The one major remaining piece here is in constraints. I'm
> thinking what I have to check is that every constraint present on the parent
> table is present on the child tables. And I'm thinking I should do that by
> looking at the constraint's textual definition (consrc).
>
> This doesn't allow you to get by with a single stronger constraint -- you
> would still need the redundant looser constraint to satisfy the inheritance.

You could find some infrastructure for "stronger constraint" recognition
in constraint exclusion code, if you want to go that way.

> But it does let you get by with constraint names that don't match the
> parent's.
>
> I'm not sure that's such a good thing, since pg_dump would then generate a
> redundant constraint when it generates the table. Maybe that would go if
> constraints got conislocal and coninh.

Currently pg_dump generates all constraints with ONLY clause anyway.

But I agree that we should get rid of ONLY for ADD CONSTRAINT once we
disallow dropping inherited constraints.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-06-08 20:44:10 Re: ADD/DROP INHERITS
Previous Message Greg Stark 2006-06-08 20:42:17 Re: ADD/DROP INHERITS