Re: [BUGS] BUG #1290: Default value and ALTER...TYPE

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: [BUGS] BUG #1290: Default value and ALTER...TYPE
Дата
Msg-id Pine.LNX.4.44.0410241707190.2015-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #1290: Default value and ALTER...TYPE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, 24 Oct 2004, Tom Lane wrote:

> > (1) Accept the default's raw parsetree from the parser
> > (2) Convert it to a cooked parsetree via transformExpr()
> > (3) Add a coercion to the table's column type
> 
> > Can't we save the cooked parsetree that we produced in #2?
> 
> Not without an initdb (to have another column to put it in).  And it
> would produce exactly the same result anyway, because the only way there
> could be implicit coercion steps at the top of the expression is because
> step 3 put them there.

Yes, and he suggested to not perform step 3. Instead one need to do that 
when the default value is used.

-- 
/Dennis Björklund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Daylight saving time
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Proposed TODO: CREATE .... WITH OWNER;