From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)atentus(dot)com> |
Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: DROP COLUMN misbehaviour with multiple inheritance |
Date: | 2002-10-03 19:31:34 |
Message-ID: | 200210031931.g93JVZM05601@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Where are we with this patch?
---------------------------------------------------------------------------
Alvaro Herrera wrote:
> On 29 Sep 2002, Hannu Krosing wrote:
>
> > On Sun, 2002-09-29 at 19:57, Tom Lane wrote:
> > > Hannu Krosing <hannu(at)tm(dot)ee> writes:
> > > > I'd propose that ADD ONLY would pull topmost attislocal up (reset it
> > > > from the (grand)child) whereas plain ADD would leave attislocal alone.
> > >
> > > ADD ONLY? There is no such animal as ADD ONLY, and cannot be because
> > > it implies making a parent inconsistent with its children.
> >
> > I meant ADD ONLY to be the exact opposite of DROP ONLY - it adds parent
> > column and removes attislocal from children. Simple ADD would _not_
> > remove attislocal from children with matching column.
>
> Consistency requires that it be exactly the opposite. When you ADD
> ONLY, you want only in the "local" table, so children still have a local
> definition; OTOH, when you ADD (recursively) you want all children to
> get non-local status.
>
> Suppose
> CREATE TABLE p (f1 int);
> CREATE TABLE c (f2 int) INHERITS (p);
> c.f2.attislocal = true
>
> Now,
> ALTER TABLE ONLY p ADD COLUMN f2 int
> should leavy c.f2.attislocal alone, while
> ALTER TABLE p ADD COLUMN f2 int
> should reset it.
>
> This is the opposite of your proposal, and I don't think it exists in
> Tom's proposal.
>
> I think this is also consistent with the fact that ONLY requires the
> column to exist in all children, while non-ONLY creates it where it
> doesn't exist, and merges (resetting attislocal if set -- it could be
> inherited from some other parent) where it exists.
>
> --
> Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
> "Nunca se desea ardientemente lo que solo se desea por razon" (F. Alexandre)
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Wildenhain | 2002-10-03 19:34:22 | Re: [HACKERS] Anyone want to assist with the |
Previous Message | Bruce Momjian | 2002-10-03 19:20:07 | Re: Optimizer generates bad plans. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Wildenhain | 2002-10-03 19:34:22 | Re: [HACKERS] Anyone want to assist with the |
Previous Message | Bruce Momjian | 2002-10-03 19:17:42 | Re: AIX compilation problems (was Re: [HACKERS] Proposal ...) |