Re: interval output format available that removes ambiguity ?
В списке pgsql-general по дате отправления:
| От | Karsten Hilbert |
|---|---|
| Тема | Re: interval output format available that removes ambiguity ? |
| Дата | |
| Msg-id | 20040505162359.A647@hermes.hilbert.loc обсуждение исходный текст |
| Ответ на | Re: interval output format available that removes ambiguity ? (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Tom, > Just subtract the two timestamps (or dates) instead of using age(). > Then you get an interval that has no month component. *That* was what I was looking for. Thanks ! > He didn't say that. He said that when the system *must* convert a > month-based interval to days and it has no date reference for it, > it uses 30 days. Something like "now() + '1 month'::interval" > will do the "right thing". This IMHO is the main application of > intervals with month components ... I knew PostgreSQL would do the Right Thing(tm) where possible and assume reasonable defaults where ambiguity exists. I just didn't know how to tell it to return the right version of the Right Thing. As usual, sage advice. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера