Re: Time intervals in select statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Time intervals in select statement
Дата
Msg-id 15348.1098194168@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Time intervals in select statement  (Luke McFarlane <luke@fisheye.com.au>)
Список pgsql-bugs
Luke McFarlane <luke@fisheye.com.au> writes:
> It's interesting why addition assumes one operand is interval while
> subtraction assumes it is timestamp? It should at least be consistent, IMHO.

There is no timestamp + timestamp operator, for reasons that should be
fairly apparent.  There are both timestamp - timestamp (yielding interval)
and timestamp - interval (yielding timestamp), and in case of ambiguity
the preferred interpretation is the one with the same datatype on both
sides.  See
http://www.postgresql.org/docs/7.4/static/typeconv-oper.html

            regards, tom lane

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

Предыдущее
От: Theodore Petrosky
Дата:
Сообщение: Re: Mac OS X make check errors...
Следующее
От: Jaime Casanova
Дата:
Сообщение: a bug in pg_dump?