| От | Tom Lane |
|---|---|
| Тема | Re: date time function |
| Дата | |
| Msg-id | 7190.1183143515@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: date time function ("John D. Burger" <john@mitre.org>) |
| Список | pgsql-general |
"John D. Burger" <john@mitre.org> writes:
> Why do the first and third intervals print out differently?
The underlying storage is months, days, and seconds --- "1 year"
is the same as "12 months", but not the same as "365 days".
IIRC plain timestamp subtraction produces an interval with days and
seconds but the month part is always 0. You can use justify_days
to convert days to months (at an assumed 30 days/month). I'm not
sure exactly what age() does but it's probably producing a value
that has nonzero months to start with.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера