]> granicus.if.org Git - postgresql/commit
The "Allow easy display of usernames in a group (pg_hba.conf uses groups
authorBruce Momjian <bruce@momjian.us>
Fri, 8 Nov 2002 17:27:03 +0000 (17:27 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 8 Nov 2002 17:27:03 +0000 (17:27 +0000)
commitfef731d1c40e0cfd98d8a3cb724f696c9abe6f7d
treeedc1a42799af6f7f84b8be0bb1ce036946e92168
parent7eb2b4b270fe956f987fc8acc0983ff161950bfd
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
src/backend/utils/adt/arrayfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/array.h