Re: help: now() + N is now failing!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: help: now() + N is now failing!
Дата
Msg-id 22708.1059495424@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: help: now() + N is now failing!  (Dmitry Tkach <dmitry@openratings.com>)
Ответы Re: help: now() + N is now failing!  (Dmitry Tkach <dmitry@openratings.com>)
Список pgsql-novice
Dmitry Tkach <dmitry@openratings.com> writes:
> But in cases like date_pli (now(), 2) - there is only one alternative,
> thus no ambiguity - why not just do it?

No, there are zero alternatives.  And we're actually moving slowly on
this issue to make the transition less painful for people.  If I had my
druthers 7.3 would have been much more draconian about implicit casts.
For an example of surprising behavior that is still there, reflect on
this open bug report:
http://archives.postgresql.org/pgsql-bugs/2001-10/msg00103.php
http://archives.postgresql.org/pgsql-bugs/2001-10/msg00108.php
The details have changed since 7.1, but we still end up comparing the
values as if they were text strings; and there is no way to avoid this
except to stop treating casts to text as implicitly invocable.

            regards, tom lane

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

Предыдущее
От: Godshall Michael
Дата:
Сообщение: switch statement in plpgsql
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: help: now() + N is now failing!