Thread: pgsql: Change array_push and array_cat so that they retain the lower

pgsql: Change array_push and array_cat so that they retain the lower

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
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?

Modified Files:
--------------
    pgsql/doc/src/sgml:
        array.sgml (r1.47 -> r1.48)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/array.sgml.diff?r1=1.47&r2=1.48)
        func.sgml (r1.293 -> r1.294)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml.diff?r1=1.293&r2=1.294)
    pgsql/src/backend/utils/adt:
        array_userfuncs.c (r1.17 -> r1.18)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/array_userfuncs.c.diff?r1=1.17&r2=1.18)
    pgsql/src/test/regress/expected:
        arrays.out (r1.27 -> r1.28)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/arrays.out.diff?r1=1.27&r2=1.28)