Re: truncating timestamps on arbitrary intervals
John Naylor <john.naylor@2ndquadrant.com>
From: John Naylor <john.naylor@2ndquadrant.com>
To: Artur Zakirov <zaartur@gmail.com>, Isaac Morland <isaac.morland@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, David Fetter <david@fetter.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-03-30T12:30:32Z
Lists: pgsql-hackers
Attachments
- v7-datetrunc_interval.patch (application/octet-stream) patch v7
I wrote: > I'm going to look into implementing timezone while awaiting comments on v6. I attempted this in the attached v7. There are 4 new functions for truncating timestamptz on an interval -- with and without origin, and with and without time zone. Parts of it are hackish, and need more work, but I think it's in passable enough shape to get feedback on. The origin parameter logic was designed with timestamps-without-time-zone in mind, and retrofitting time zone on top of that was a bit messy. There might be bugs. -- John Naylor https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Disallow negative strides in date_bin()
- fc0d9b8c224f 14.0 landed
- 3ba70d4e1523 15.0 landed
-
Improve behavior of date_bin with origin in the future
- 496e58bb0e5e 14.0 landed
-
doc: Additional documentation for date_bin
- 49fb4e6b2490 14.0 landed
-
Add date_bin function
- 49ab61f0bdc9 14.0 landed