]> granicus.if.org Git - postgresql/commit
Fix ExecEvalArrayRef to pass down the old value of the array element or slice
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 18 Feb 2010 18:42:04 +0000 (18:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 18 Feb 2010 18:42:04 +0000 (18:42 +0000)
commit1a709257a9f0b1e4c58f92e8efe934bc600656e4
tree8ff6b5843abbef7d13cfaece38ce05bcd361fd9a
parent192cd7f390b5593cf597e328aed1dcb99776b38b
Fix ExecEvalArrayRef to pass down the old value of the array element or slice
being assigned to, in case the expression to be assigned is a FieldStore that
would need to modify that value.  The need for this was foreseen some time
ago, but not implemented then because we did not have arrays of composites.
Now we do, but the point evidently got overlooked in that patch.  Net result
is that updating a field of an array element doesn't work right, as
illustrated if you try the new regression test on an unpatched backend.
Noted while experimenting with EXPLAIN VERBOSE, which has also got some issues
in this area.

Backpatch to 8.3, where arrays of composites were introduced.
src/backend/executor/execQual.c
src/test/regress/expected/arrays.out
src/test/regress/sql/arrays.sql