Arrange for an explicit cast applied to an ARRAY[] constructor to be applied
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 20 Mar 2008 21:42:48 +0000 (21:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 20 Mar 2008 21:42:48 +0000 (21:42 +0000)
commit14c9284a3e9c7f1d9cf689a3ddb95b84f1199d52
treec0cfd43454a96b7a0beb7abbbca7f1e3bba27b84
parent8c7b55103b059f931bece2136cfaf3a5d31eec20
Arrange for an explicit cast applied to an ARRAY[] constructor to be applied
directly to all the member expressions, instead of the previous implementation
where the ARRAY[] constructor would infer a common element type and then we'd
coerce the finished array after the fact.  This has a number of benefits,
one being that we can allow an empty ARRAY[] construct so long as its
element type is specified by such a cast.

Brendan Jurd, minor fixes by me.
doc/src/sgml/syntax.sgml
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/parser/gram.y
src/backend/parser/parse_expr.c
src/backend/parser/parse_target.c
src/include/nodes/nodes.h
src/include/nodes/parsenodes.h
src/test/regress/expected/arrays.out
src/test/regress/sql/arrays.sql