Re: Happy column adding (was RE: [HACKERS] Happy column dropping)

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Happy column adding (was RE: [HACKERS] Happy column dropping)
Дата
Msg-id 388E4066.3CDEE504@tm.ee
обсуждение исходный текст
Ответ на RE: [HACKERS] Happy column dropping  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
Tom Lane wrote:
> 
> Don Baccus <dhogaza@pacifier.com> writes:
> > However, heap_getattr still won't see the default since it simply
> > checks to see of the attribute number falls off the end of the
> > tuple and then returns null.
> 
> Right.
> 
> > There's no provision for then pulling out the default value and
> > returning it instead.
> 
> Would it even be possible to do that?  I'm not sure that heap_getattr
> has any way to find the default.  It only has a TupleDesc, not a
> reference to the relation itself...

but could it not return a special value, say COLUMN_DEFAULT, that upper 
levels know to replace with the real default. Of course it get's funny if 
if the default is nextval('myseq')  or CURRENT_TIME.

another way to approach the whole problem is to have something like 
generation_id in each tuple that tells which version of TupleDesc applies 
to this tuple, but it seems to complicate things even further.

-----------------
Hannu


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] --enable-debug
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Happy column adding (was RE: [HACKERS] Happy columndropping)