Re: ADD/DROP CONSTRAINT and inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ADD/DROP CONSTRAINT and inheritance
Date: 2001-05-23 17:55:21
Message-ID: 16062.990640521@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-05-23 18:12:36 Re: Not released yet, but could someone take a quick peak ...
Previous Message Vince Vielhaber 2001-05-23 17:20:36 Re: Not released yet, but could someone take a quick peak ...