The "Allow easy display of usernames in a group (pg_hba.conf uses groups
Bruce Momjian <bruce@momjian.us>
The "Allow easy display of usernames in a group (pg_hba.conf uses groups now)" item on the open items, and subsequent plpgsql function I sent in, made me realize it was too hard to get the upper and lower bound of an array. The attached creates two functions that I think will be very useful when combined with the ability of plpgsql to return sets. array_lower(array, dim_num) - and - array_upper(array, dim_num) They return the value (as an int) of the upper and lower bound of the requested dim in the provided array. Joe Conway
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/arrayfuncs.c | modified | +60 −1 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +5 −1 |
| src/include/utils/array.h | modified | +3 −1 |