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.