Re: effective SELECT from child tables

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: effective SELECT from child tables
Дата
Msg-id 1128257857.4823.2.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: effective SELECT from child tables  (Greg Stark <gsstark@mit.edu>)
Ответы Re: effective SELECT from child tables  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
On P, 2005-10-02 at 01:24 -0400, Greg Stark wrote:
> Hannu Krosing <hannu@skype.net> writes:
> 
> > I also often wish that this would be possible when someone adds a column
> > with a default value to a multi-million row table on a 24/7 production
> > system and insists on filling all existing columns with the default.
> > 
> > A rule "ON SELECT FROM table_x WHERE col_x IS NULL return
> > col_x=default_for_col_x" would solve that nicely.
> 
> Of course that only works if the reason they want to set fill the rows with
> the default value isn't precisely because NULL is a perfectly reasonable thing
> for the column to have (but not what they want for the existing rows).

Sure.

What would be needed for adding new colums with default filling would be
some end-of-tuple marker or stored column count or tuple version nr, and
then a rule (or just default behaviour) of showing default value for
*missing* columns (colno > nr of stored columns).

-- 
Hannu Krosing <hannu@skype.net>



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PERFORM] A Better External Sort?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: effective SELECT from child tables