Re: [PATCHES] ADD/DROP INHERITS

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [PATCHES] ADD/DROP INHERITS
Дата
Msg-id 87fyicg9mx.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: [PATCHES] ADD/DROP INHERITS  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: That EXPLAIN ANALYZE patch still needs work
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(), pg_get_attrdef(), pg_get_tabledef(), pg_get_domaindef(), pg_get_functiondef()