pgsql: Fix ExecEvalArrayRef to pass down the old value of the array

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix ExecEvalArrayRef to pass down the old value of the array
Date: 2010-02-18 18:41:55
Message-ID: 20100218184155.DAF1D7541C5@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
pgsql/src/backend/executor:
execQual.c (r1.250.2.3 -> r1.250.2.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.250.2.3&r2=1.250.2.4)
pgsql/src/test/regress/expected:
arrays.out (r1.48 -> r1.48.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/arrays.out?r1=1.48&r2=1.48.2.1)
pgsql/src/test/regress/sql:
arrays.sql (r1.36 -> r1.36.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/arrays.sql?r1=1.36&r2=1.36.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-02-18 18:42:04 pgsql: Fix ExecEvalArrayRef to pass down the old value of the array
Previous Message Tom Lane 2010-02-18 18:41:47 pgsql: Fix ExecEvalArrayRef to pass down the old value of the array