Re: [PATCHES] ADD/DROP INHERITS

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] ADD/DROP INHERITS
Date: 2006-06-10 18:15:18
Message-ID: 87fyicg9mx.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > Maybe it would be better to set attislocal=0 if the attinhcount goes from
> > 0->1?
>
> That just moves the surprises to other cases.

Sure, but if we're not allowing new columns to be created, those surprise
cases now include virtually every case. At least for partitioned tables.

> I think I'd prefer to err in the direction that can't cause unexpected data
> loss (due to columns being dropped that perhaps should not have been).

I figured that was the thinking. Perhaps what's really needed is to move away
from the idea of automatically deciding whether to drop child columns and
never drop child columns unless the user specifies some keyword which would
force them to always be dropped.

It seems to me that trying to distinguish "locally defined" versus "only
inherited" is too subtle a distinction and depends too much on what the user
considers a local definition. What's "locally defined" seems to vary depending
on the application.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-10 18:18:03 Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()
Previous Message Marc G. Fournier 2006-06-10 18:09:32 Re: archive threads across months (was Re: [HACKERS]

Browse pgsql-patches by date

  From Date Subject
Next Message John Gray 2006-06-10 20:10:12 Re: pgxml & xpath_table
Previous Message Tom Lane 2006-06-10 18:06:01 Re: pgxml & xpath_table