pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add date_bin function
Date: Wed, 24 Mar 2021 15:24:51 +0000
Message-ID: <E1lP5NL-00075e-EF@gemulon.postgresql.org> (raw)

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....

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(-)



Message-ID: <E1lP5NL-00075e-EF@gemulon.postgresql.org>
Permalink:  ../E1lP5NL-00075e-EF@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lP5NL-00075e-EF@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Add date_bin function
  In-Reply-To: <E1lP5NL-00075e-EF@gemulon.postgresql.org>
  References: <E1lP5NL-00075e-EF@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox