Re: Bug in date arithmetic

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug in date arithmetic
Дата
Msg-id 6196.1251145150@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug in date arithmetic  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> I wonder if we could get around this by inventing a new type
> date_or_interval which looks at the input and decides which it is
> using fairly strict rules. date_sub would take that type and do the
> appropriate operation based on what the constant had in it.

Ick.  This would be a pretty enormous blot on the type system to solve
one special case, in a manner that would only be helpful to newbies
who don't know that they ought to cast to eliminate the ambiguity.

In fact it sounds quite a bit like the implicit-cast-to-text situations
we just finished getting rid of ...
        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Feedback about Drupal SQL debugging
Следующее
От: David Fetter
Дата:
Сообщение: Re: Bug in date arithmetic