Possible Typecasting Bug with coalesce()

Поиск
Список
Период
Сортировка
От MotherMGA
Тема Possible Typecasting Bug with coalesce()
Дата
Msg-id 1153144111.677727.24820@m79g2000cwm.googlegroups.com
обсуждение исходный текст
Ответы Re: Possible Typecasting Bug with coalesce()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello everyone, I found something that struck me as odd revolving
around automatic typecasting and coalesce. It appears as though a
timestamp will not automatically be cast to a timestamp if the
timestamp is coalesced. Consider the following example:
=> select now()>'Jul 14 2006 9:16:47AM';?column?
----------t
(1 row)

=> select now()>coalesce('Jul 14 2006 9:16:47AM');?column?
----------f
(1 row)

=> select now()>coalesce('Jul 14 2006 9:16:47AM')::timestamp with time
zone;?column?
----------t
(1 row)

=> select now()>coalesce('Jul 14 2006 9:16:47AM'::timestamp with time
zone);?column?
----------t
(1 row)

Just wanted to know if anyone was aware of this behavior and if it is
correct. 

Thanks, 
Scott.



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

Предыдущее
От: Matteo Bertini
Дата:
Сообщение: Re: plpython sets
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] Proposed patch for contrib/cube