Re: Bug in date arithmetic

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Bug in date arithmetic
Дата
Msg-id 4A92BC38020000250002A00C@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Bug in date arithmetic  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Bug in date arithmetic
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> wrote:
> David Fetter<david@fetter.org> wrote:
>> I'm thinking that the unknown literal here should just cause an
>> error in the case of '+'.  Same with '-', for what it's worth.
> 
> That would make a lot of people very unhappy. They expect things
> like
> 
> select date + '1 year'
> 
> to just work.
I realize I'm in a minority on this, but I would also prefer an error.
I expect things like
SELECT "date" + (INTERVAL '1' YEAR)
to just work.  This whole business of taking a perfectly explicit
character string literal and treating it as an unknown literal until
something in the surrounding context causes it to automagically
resolve to any type kinda makes my skin crawl.
I'd love to have a GUC to resolve character string literals to text
when they're not in a context which makes them part of some other
standard literal declaration.
-Kevin


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 8.5 release timetable, again
Следующее
От: Robert Haas
Дата:
Сообщение: Re: 8.5 release timetable, again