Re: effective SELECT from child tables

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: effective SELECT from child tables
Дата
Msg-id 87irwe7ymp.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: effective SELECT from child tables  (Hannu Krosing <hannu@skype.net>)
Ответы Re: effective SELECT from child tables  (Rod Taylor <pg@rbt.ca>)
Re: effective SELECT from child tables  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:

> On P, 2005-10-02 at 23:00 -0400, Tom Lane wrote:
> > 
> > Here's another interesting case to think about:
> > 
> >     ALTER TABLE ADD foo integer DEFAULT 1
> >     ...
> >     ALTER TABLE ALTER foo SET DEFAULT 2
> >
> > You'll have to pay the table-traversal cost on one step or the other.
> 
> The second, ALTER ... SET DEFAULT, would only set default for newly
> inserted columns, not the ones which are missing due to tuples being
> created before the column existed.

Hm. So you're saying there are only ever exactly two types of defaults. The
"initial" default that applies to all tuples that were created before the
column was added. And the "current" default that only ever applies to newly
created tuples.

That does seem to cleanly close this hole.

-- 
greg



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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: effective SELECT from child tables
Следующее
От: Tom Lane
Дата:
Сообщение: Re: New Point Releases Available