pgsql: Fix up plpgsql's "simple expression" evaluation mechanism so that

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix up plpgsql's "simple expression" evaluation mechanism so that
Дата
Msg-id 20070128161558.38ADF9FB209@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix up plpgsql's "simple expression" evaluation mechanism so that it behaves
safely in the presence of subtransactions.  To ensure that any ExprContext
shutdown callbacks are called at the right times, we have to have a separate
EState for each level of subtransaction.  Per "TupleDesc reference leak" bug
report from Stefan Kaltenbrunner.

Although I'm convinced the code is wrong as far back as 8.0, it doesn't seem
that there are any ways for the problem to really manifest before 8.2: AFAICS,
8.0 and 8.1 only use the ExprContextCallback mechanism to handle set-returning
functions, which cannot usefully be executed in a "simple expression" anyway.
Hence, no backpatch before 8.2 --- the risk of unforeseen breakage seems
to outweigh the chance of fixing something.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        pl_exec.c (r1.180 -> r1.180.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c.diff?r1=1.180&r2=1.180.2.1)
        pl_handler.c (r1.33 -> r1.33.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_handler.c.diff?r1=1.33&r2=1.33.2.1)
        plpgsql.h (r1.81 -> r1.81.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h.diff?r1=1.81&r2=1.81.2.1)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix up plpgsql's "simple expression" evaluation mechanism so that
Следующее
От: neilc@postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: Add a new builtin type, "uuid".