Re: Bug in date arithmetic

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Bug in date arithmetic
Дата
Msg-id
15012.1251134326@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic Greg Stark <gsstark@mit.edu>
Re: Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic David Fetter <david@fetter.org>
Re: Bug in date arithmetic "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Bug in date arithmetic Tom Lane <tgl@sss.pgh.pa.us>
Re: Bug in date arithmetic Josh Berkus <josh@agliodbs.com>
Re: Bug in date arithmetic Sam Mason <sam@samason.me.uk>
I wrote:
> ... I'm not sure why it's complaining about field overflow
> rather than syntax error when the literal is taken as a timestamp,
> but that's a pretty minor issue.

Oh, of course, it's because we allow this shorthand:

regression=# select '900102'::timestamptz;     timestamptz       
------------------------1990-01-02 00:00:00-05
(1 row)

so '900000'::timestamptz is seen as year (19)90, month 00, day 00,
and "field out of range" is entirely sensible for that.

Just out of curiosity, what were you *expecting* this to do?
You obviously weren't expecting the literal to be taken as
interval, but its contents are not very sane for any other
likely interpretation.
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
Сообщение: Re: DELETE syntax on JOINS
От: Greg Stark
Дата:
FAQ