Re: date_trunc function in interval version
От | Przemysław Sztoch |
---|---|
Тема | Re: date_trunc function in interval version |
Дата | |
Msg-id | 21773b3e-4ec7-c6a0-e954-ee031ddcdea0@sztoch.pl обсуждение исходный текст |
Ответ на | Re: date_trunc function in interval version (John Naylor <johncnaylorls@gmail.com>) |
Ответы |
Re: date_trunc function in interval version
|
Список | pgsql-hackers |
date_bin has big problem with DST.
In example, if you put origin in winter zone, then generated bin will be incorrect for summer input date.
date_trunc is resistant for this problem.
My version of date_trunc is additionally more flexible, you can select more granular interval, 12h, 8h, 6h, 15min, 10 min etc...
John Naylor wrote on 23.12.2023 01:32:
In example, if you put origin in winter zone, then generated bin will be incorrect for summer input date.
date_trunc is resistant for this problem.
My version of date_trunc is additionally more flexible, you can select more granular interval, 12h, 8h, 6h, 15min, 10 min etc...
John Naylor wrote on 23.12.2023 01:32:
On Sat, Dec 23, 2023 at 5:26 AM Przemysław Sztoch <przemyslaw@sztoch.pl> wrote:In my opinion date_trunc is very good name. Truncated data is timestamp type, not interval. First parameter has same meaning in original date_trunc and in my new version. New version provides only more granularity.I haven't looked at the patch, but your description sounds awfully close to date_bin(), which already takes an arbitrary interval.
--
Przemysław Sztoch | Mobile +48 509 99 00 66
Przemysław Sztoch | Mobile +48 509 99 00 66
В списке pgsql-hackers по дате отправления: