pgsql: Add width_bucket(anyelement, anyarray).

Started by Tom Lanealmost 12 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers