BUG #4085: No implicit cast after coalesce

Поиск
Список
Период
Сортировка
От Jeff Dwyer
Тема BUG #4085: No implicit cast after coalesce
Дата
Msg-id 200804022104.m32L4MtG077191@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4085: No implicit cast after coalesce  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4085
Logged by:          Jeff Dwyer
Email address:      jdwyer@patientslikeme.com
PostgreSQL version: 8.3.1
Operating system:   Mac OS X
Description:        No implicit cast after coalesce
Details:

This works fine:
select 1 where current_date between '1900-3-3' and '1900-2-2';
This doesn't:
select 1 where current_date between coalesce(null,current_date)  and
coalesce(null, '1900-1-2');

This fix works:
select 1 where current_date between coalesce(null,current_date)  and
coalesce(null, date('1900-1-2'));


This seems like a bug to me. Why should an explicit cast be necessary after
a coalesce? This broke code that worked in 8.1.

Thanks,
-Jeff

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

Предыдущее
От: "Premysl Paska"
Дата:
Сообщение: BUG #4084: Some DST timezones switche to summer time (one week) later
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #4085: No implicit cast after coalesce