diff options
| author | Tom Lane | 2014-09-09 19:34:10 +0000 |
|---|---|---|
| committer | Tom Lane | 2014-09-09 19:34:14 +0000 |
| commit | e80252d424278abf65b624669c8e6b3fe8587cac (patch) | |
| tree | 711787853ebf7be4b107aec36381b181d2a684fe /src/include/utils/array.h | |
| parent | 220bb39dee8044937a963e81be8796e99bd8508b (diff) | |
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
Diffstat (limited to 'src/include/utils/array.h')
| -rw-r--r-- | src/include/utils/array.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/array.h b/src/include/utils/array.h index 9bbfaae85ef..e744314c51b 100644 --- a/src/include/utils/array.h +++ b/src/include/utils/array.h @@ -214,6 +214,7 @@ extern Datum array_fill_with_lower_bounds(PG_FUNCTION_ARGS); extern Datum array_unnest(PG_FUNCTION_ARGS); extern Datum array_remove(PG_FUNCTION_ARGS); extern Datum array_replace(PG_FUNCTION_ARGS); +extern Datum width_bucket_array(PG_FUNCTION_ARGS); extern Datum array_ref(ArrayType *array, int nSubscripts, int *indx, int arraytyplen, int elmlen, bool elmbyval, char elmalign, |
