| От | Tom Lane |
|---|---|
| Тема | Re: What's wrong with my date/interval arithmetic? |
| Дата | |
| Msg-id | 23923.1078208721@sss.pgh.pa.us обсуждение |
| Ответ на | What's wrong with my date/interval arithmetic? (Wojtek <wojtg@polbox.com>) |
| Ответы |
Re: What's wrong with my date/interval arithmetic?
Strings in UDFs |
| Список | pgsql-sql |
Wojtek <wojtg@polbox.com> writes:
> Why is the "result" incorrect (off by one day)?
> When I do the exactly same arithmetic using timestamps created
> with to_timestamp, everything is OK ("expected_result").
It is not "exactly the same arithmetic", because to_timestamp
delivers a result of type timestamp-with-time-zone, whereas your
other values are evidently timestamp without time zone. You did
not say what timezone setting you are using, but I think the
discrepancy is probably explained by that.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера