Thread: pgsql-server: Require that array literals produce "rectangular" arrays,

pgsql-server: Require that array literals produce "rectangular" arrays,

From
joe@svr1.postgresql.org (Joe Conway)
Date:
Log Message:
-----------
Require that array literals produce "rectangular" arrays, i.e. all the
subarrays of a given dimension have the same number of elements/subarrays.

Also repair a longstanding undocumented (as far as I can see) ability to
explicitly set array bounds in the array literal syntax. It now can
deal properly with negative array indicies. Modify array_out so that
arrays with non-standard lower bounds (i.e. not 1) are output with
the expicit dimension syntax. This fixes a longstanding issue whereby
arrays with non-default lower bounds had them changed to default
after a dump/reload cycle.

Modify regression tests and docs to suit, and add some minimal
documentation regarding the explicit dimension syntax.

Modified Files:
--------------
    pgsql-server/doc/src/sgml:
        array.sgml (r1.35 -> r1.36)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/doc/src/sgml/array.sgml.diff?r1=1.35&r2=1.36)
    pgsql-server/src/backend/utils/adt:
        arrayfuncs.c (r1.105 -> r1.106)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/arrayfuncs.c.diff?r1=1.105&r2=1.106)
    pgsql-server/src/test/regress/expected:
        arrays.out (r1.21 -> r1.22)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/expected/arrays.out.diff?r1=1.21&r2=1.22)
        domain.out (r1.31 -> r1.32)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/expected/domain.out.diff?r1=1.31&r2=1.32)
    pgsql-server/src/test/regress/sql:
        domain.sql (r1.16 -> r1.17)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/sql/domain.sql.diff?r1=1.16&r2=1.17)