Add width_bucket(anyelement, anyarray).
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Sep 2014 19:34:10 +0000 (15:34 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 9 Sep 2014 19:34:14 +0000 (15:34 -0400)
commite80252d424278abf65b624669c8e6b3fe8587cac
tree711787853ebf7be4b107aec36381b181d2a684fe
parent220bb39dee8044937a963e81be8796e99bd8508b
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
doc/src/sgml/func.sgml
src/backend/utils/adt/arrayfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/array.h
src/test/regress/expected/arrays.out
src/test/regress/sql/arrays.sql