Re: DROP COLUMN misbehaviour with multiple inheritance - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: DROP COLUMN misbehaviour with multiple inheritance
Date
Msg-id 20020928200604.7382871e.alvherre@atentus.com
Whole thread Raw
In response to Re: DROP COLUMN misbehaviour with multiple inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: DROP COLUMN misbehaviour with multiple inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
En Mon, 23 Sep 2002 09:53:08 -0400
Tom Lane <tgl@sss.pgh.pa.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.


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug in PL/pgSQL GET DIAGNOSTICS?
Next
From: Bruce Momjian
Date:
Subject: Re: 7.2.3?