Re: ADD/DROP constraints - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: ADD/DROP constraints
Date
Msg-id 1149799422.3918.15.camel@localhost.localdomain
Whole thread Raw
In response to ADD/DROP constraints  (Greg Stark <gsstark@mit.edu>)
List 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




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ADD/DROP INHERITS
Next
From: Simon Riggs
Date:
Subject: Re: That EXPLAIN ANALYZE patch still needs work