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(at)tm(dot)ee, pgsql-hackers(at)postgresql(dot)org
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance
Date: 2002-09-29 00:06:04
Message-ID: 20020928200604.7382871e.alvherre@atentus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

En Mon, 23 Sep 2002 09:53:08 -0400
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escribió:

> > You cannot add a column to a table that is inherited by another table
> > that has a column with the same name:
>
> Yeah, this is an implementation shortcoming in ALTER ADD COLUMN: if it
> finds an existing column of the same name in a child table, it should
> test whether it's okay to "merge" the columns (same types, no conflict
> in constraints/defaults, cf CREATE's behavior); if so, it should
> increment the child column's attinhcount instead of failing.

I have this almost ready. The thing I don't have quite clear yet is
what to do with attislocal. IMHO it should not be touched in any case,
but Hannu thinks that for symmetry it should be reset in some cases.

Also, what do you mean by conflicts on defaults? I don't think the
parent should take into consideration what the defaults are for its
children. Same for constraints.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
Si no sabes adonde vas, es muy probable que acabes en otra parte.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-29 01:23:31 Re: 7.2.3?
Previous Message Bruce Momjian 2002-09-28 23:20:43 Re: Bug in PL/pgSQL GET DIAGNOSTICS?

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2002-09-29 00:26:55 CLUSTER ALL patch
Previous Message Tom Lane 2002-09-28 20:38:29 Re: [PATCHES] Cascaded Column Drop