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

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix ExecEvalArrayRef to pass down the old value of the array
Дата
Msg-id 20100218184147.A9EC97541C5@cvs.postgresql.org
обсуждение исходный текст
Список 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.

Modified Files:
--------------
    pgsql/src/backend/executor:
        execQual.c (r1.261 -> r1.262)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.261&r2=1.262)
    pgsql/src/test/regress/expected:
        arrays.out (r1.49 -> r1.50)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/arrays.out?r1=1.49&r2=1.50)
    pgsql/src/test/regress/sql:
        arrays.sql (r1.36 -> r1.37)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/arrays.sql?r1=1.36&r2=1.37)

В списке pgsql-committers по дате отправления:

Предыдущее
От: heikki@postgresql.org (Heikki Linnakangas)
Дата:
Сообщение: pgsql: Fix pq_getbyte_if_available() function.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix ExecEvalArrayRef to pass down the old value of the array