pgsql: Add date_bin function - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Add date_bin function
Date
Msg-id E1lP5NL-00075e-EF@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add date_bin function

Similar to date_trunc, but allows binning by an arbitrary interval
rather than just full units.

Author: John Naylor <john.naylor@enterprisedb.com>
Reviewed-by: David Fetter <david@fetter.org>
Reviewed-by: Isaac Morland <isaac.morland@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Artur Zakirov <zaartur@gmail.com>
Discussion:
https://www.postgresql.org/message-id/flat/CACPNZCt4buQFRgy6DyjuZS-2aPDpccRkrJBmgUfwYc1KiaXYxg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/49ab61f0bdc93984a8d36b602f6f2a15f09ebcc7

Modified Files
--------------
doc/src/sgml/func.sgml                    | 50 ++++++++++++++++
src/backend/utils/adt/timestamp.c         | 74 ++++++++++++++++++++++++
src/include/catalog/catversion.h          |  2 +-
src/include/catalog/pg_proc.dat           | 11 ++++
src/test/regress/expected/timestamp.out   | 96 +++++++++++++++++++++++++++++++
src/test/regress/expected/timestamptz.out | 66 +++++++++++++++++++++
src/test/regress/sql/timestamp.sql        | 62 ++++++++++++++++++++
src/test/regress/sql/timestamptz.sql      | 42 ++++++++++++++
8 files changed, 402 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
Next
From: Robert Haas
Date:
Subject: pgsql: Tidy up more loose ends related to configurable TOAST compressio