Re: [PATCHES] ADD/DROP INHERITS - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [PATCHES] ADD/DROP INHERITS
Date
Msg-id 87fyicg9mx.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: [PATCHES] ADD/DROP INHERITS  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: That EXPLAIN ANALYZE patch still needs work
Next
From: Tom Lane
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()