pgsql: Add width_bucket(anyelement, anyarray).

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add width_bucket(anyelement, anyarray).
Date: 2014-09-09 19:34:38
Message-ID: E1XRRBW-0005oV-5X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add width_bucket(anyelement, anyarray).

This provides a convenient method of classifying input values into buckets
that are not necessarily equal-width. It works on any sortable data type.

The choice of function name is a bit debatable, perhaps, but showing that
there's a relationship to the SQL standard's width_bucket() function seems
more attractive than the other proposals.

Petr Jelinek, reviewed by Pavel Stehule

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e80252d424278abf65b624669c8e6b3fe8587cac

Modified Files
--------------
doc/src/sgml/func.sgml | 33 +++--
src/backend/utils/adt/arrayfuncs.c | 243 ++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 6 +-
src/include/utils/array.h | 1 +
src/test/regress/expected/arrays.out | 123 +++++++++++++++++
src/test/regress/sql/arrays.sql | 62 +++++++++
7 files changed, 458 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-09-09 21:51:17 pgsql: Change the spinlock primitives to function as compiler barriers.
Previous Message Peter Eisentraut 2014-09-09 18:08:41 pgsql: doc: Reflect renaming of Mac OS X to OS X