Re: Cascaded Column Drop - Mailing list pgsql-patches

From Tom Lane
Subject Re: Cascaded Column Drop
Date
Msg-id 21519.1033105417@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cascaded Column Drop  (Alvaro Herrera <alvherre@atentus.com>)
List pgsql-patches
Alvaro Herrera <alvherre@atentus.com> writes:
> But think about the inheritance case again: suppose

> create table p (f1 int);
> create table c (f2 int) inherits (p);

> Now you just change your mind and want to drop p but not c.  You can't
> do it because f1 is the last column on it, and c inherits it.  So a way
> to drop the last column inherited (thus freeing the dependency on p)
> makes c independent, and you can drop p.

Hmm, no I don't think so.  Parent-to-child dependence is a property of
the two tables, not of their columns, and should not go away just
because you reduce the parent to zero columns.  I would expect that if
I dropped p.f1 (assuming this were allowed) and then added p.g1, that
c would also now have c.g1.  So the parent/child relationship outlives
any specific column ... IMHO anyway.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: one last patch - array lower and upper bound
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: one last patch - array lower and upper bound