Skip site navigation (1) Skip section navigation (2)

Re: Cascaded Column Drop

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)atentus(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Rod Taylor <rbt(at)rbt(dot)ca>,PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Cascaded Column Drop
Date: 2002-09-27 05:43:37
Message-ID: 21519.1033105417@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Alvaro Herrera <alvherre(at)atentus(dot)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

In response to

pgsql-hackers by date

Next:From: Markus BertheauDate: 2002-09-27 06:48:40
Subject: Re: [PHP] WebDB Developers Wanted
Previous:From: Yury BokhoncovichDate: 2002-09-27 05:14:40
Subject: Re: [HACKERS] Performance while loading data and indexing

pgsql-patches by date

Next:From: Nigel J. AndrewsDate: 2002-09-27 23:19:59
Subject: Re: one last patch - array lower and upper bound
Previous:From: Bruce MomjianDate: 2002-09-27 04:46:33
Subject: Re: one last patch - array lower and upper bound

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group