Re: ADD/DROP CONSTRAINT and inheritance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ADD/DROP CONSTRAINT and inheritance
Date
Msg-id 16062.990640521@sss.pgh.pa.us
Whole thread Raw
In response to Re: ADD/DROP CONSTRAINT and inheritance  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses RE: ADD/DROP CONSTRAINT and inheritance  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Wed, 23 May 2001, Christopher Kings-Lynne wrote:
>> For the add/drop constraint clauses would it be an idea to change the syntax
>> to:
>> 
>> ALTER TABLE [ ONLY ] x ADD CONSTRAINT x;
>> ALTER TABLE [ ONLY ] x DROP CONSTRAINT x;

If the patch is coded in the same style as the existing ALTER code then
this will happen automatically.  Are you looking at current development
tip as the comparison point for your changes?

> A related question is whether or not you can drop a constraint on a
> subtable that's inherited from a parent.

There is the question of whether it's a good idea to allow a constraint
to exist on a parent but not on its subtables.  Seems like a bad idea to
me.  But as long as the default is to propagate these changes, I'm not
really eager to prohibit DBAs from doing the other.  Who's to say what's
a misuse of inheritance and what's not...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Not released yet, but could someone take a quick peak ...
Next
From: Tom Lane
Date:
Subject: Re: XMAX weirdness (was: Plans for solving the VACUUM problem)