Re: DROP COLUMN misbehaviour with multiple inheritance

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Alvaro Herrera <alvherre(at)atentus(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance
Date: 2002-09-20 20:37:12
Message-ID: Pine.LNX.4.44.0209201634350.16381-100000@cm-lcon1-46-187.cm.vtr.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane dijo:

> I think we could make all these cases work if we replaced attisinherited
> with *two* columns, a boolean attislocal(ly defined) and a count of
> (direct) inheritances. DROP ONLY would have the effect of decrementing
> the count and setting attislocal to true in each direct child; recursive
> DROP would decrement the count and then drop if count is 0 *and*
> attislocal is not set. At the start of a recursion, we'd allow DROP
> only if count is 0 (and, presumably, attislocal is true, else the column
> would not be there...).

The cases you presented are really tricky. I'll work today on the
attislocal and attinhcount patch; I hope to have it ready later today
for review and inclusion before beta2.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
Officer Krupke, what are we to do?
Gee, officer Krupke, Krup you! (West Side Story, "Gee, Officer Krupke")

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Buckman 2002-09-20 21:18:24 Lyris looking to help fix PostgresSQL crashing problems
Previous Message Neil Conway 2002-09-20 19:54:45 Re: Monitoring a Query

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-09-20 21:32:18 Re: [PATCHES] to_char(FM9.9) bug fix
Previous Message Peter Eisentraut 2002-09-20 19:24:00 Re: [PATCHES] to_char(FM9.9) bug fix