]> 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:41:55 +0000 (18:41 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 18 Feb 2010 18:41:55 +0000 (18:41 +0000)
commitdfb3bc020dc2709aa78156fef63bfa60f6fc8b32
tree6e62acf0eb064a8126287646242949be520b2b9c
parent85a646aee39b97b68bd70956db95afd11cde93a8
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