OSDN Git Service

Change array_push and array_cat so that they retain the lower bound of
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Nov 2005 01:50:08 +0000 (01:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 19 Nov 2005 01:50:08 +0000 (01:50 +0000)
commit1e9a1a70adc1f36d9ba8cd67ce974f777df7aafb
tree2f254673cf73e55c6f78bc45d6ae4ce25ea307b3
parent8685c472235b7a5bcc786f66ba9adde44e3d670c
Change array_push and array_cat so that they retain the lower bound of
the array (for array_push) or higher-dimensional array (for array_cat)
rather than decrementing it as before.  This avoids generating lower
bounds other than one for any array operation within the SQL spec.  Per
recent discussion.
Interestingly, this seems to have been the original behavior, because
while updating the docs I noticed that a large fraction of relevant
examples were *wrong* for the old behavior and are now right.  Is it
worth correcting this in the back-branch docs?
doc/src/sgml/array.sgml
doc/src/sgml/func.sgml
src/backend/utils/adt/array_userfuncs.c
src/test/regress/expected/arrays.out