pgsql: Fix plpython's handling of functions used as triggers on multipl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix plpython's handling of functions used as triggers on multipl
Дата
Msg-id E1TyrJS-00023I-7R@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix plpython's handling of functions used as triggers on multiple tables.

plpython tried to use a single cache entry for a trigger function, but it
needs a separate cache entry for each table the trigger is applied to,
because there is table-dependent data in there.  This was done correctly
before 9.1, but commit 46211da1b84bc3537e799ee1126098e71c2428e8 broke it
by simplifying the lookup key from "function OID and triggered table OID"
to "function OID and is-trigger boolean".  Go back to using both OIDs
as the lookup key.  Per bug report from Sandro Santilli.

Andres Freund

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/308711afc759fa0f3cc0b40844d4647cead0997f

Modified Files
--------------
src/pl/plpython/expected/plpython_trigger.out |   24 ++++++++
src/pl/plpython/plpy_main.c                   |   10 ++-
src/pl/plpython/plpy_procedure.c              |   77 +++++++++++++------------
src/pl/plpython/plpy_procedure.h              |   11 +++-
src/pl/plpython/sql/plpython_trigger.sql      |   18 ++++++
5 files changed, 99 insertions(+), 41 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix plpython's handling of functions used as triggers on multipl
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix plpython's handling of functions used as triggers on multipl