Re: DROP COLUMN misbehaviour with multiple inheritance

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance
Date: 2002-09-12 15:23:41
Message-ID: 1031844221.29045.16.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, 2002-09-12 at 16:14, Tom Lane wrote:
> Hannu Krosing <hannu(at)tm(dot)ee> writes:
> > I've come upon a misbehaviour of drop column, where drop column
> > unconditionally drops inherited column from child tables.
> > What it should do is to check if the same column is not inherited from
> > other parents and drop it only when it is not
>
> Hm. Seems like attisinherited should have been a count, not a boolean.

either that, or some check at drop column time.

> Is anyone sufficiently excited about this issue to force an initdb to
> fix it?

The count approach seems definitely the right way, but a check (possibly
a slow one) can be probably done without initdb.

The other sad thing about the current behaviour is that in addition to
being wrong it also breaks dump/reload - after dump/reload the initially
dropped column is back in c1.

-------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karel Zak 2002-09-12 15:29:06 failed Assert() in utf8_and_iso8859_1.c
Previous Message Greg Copeland 2002-09-12 15:19:00 Re: Schemas not available for pl/pgsql %TYPE....

Browse pgsql-patches by date

  From Date Subject
Next Message Bruno Wolff III 2002-09-12 15:28:39 Re: Earth Distance patch
Previous Message Tom Lane 2002-09-12 14:41:53 Re: DROP COLUMN misbehaviour with multiple inheritance