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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix plpython's handling of functions used as triggers on multipl
Date: 2013-01-25 21:59:54
Message-ID: E1TyrJS-00023K-8N@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/17dee323e7ff67863582f279e415a8228e0b99cd

Modified Files
--------------
src/pl/plpython/expected/plpython_trigger.out | 24 ++++++
src/pl/plpython/plpython.c | 100 ++++++++++++++----------
src/pl/plpython/sql/plpython_trigger.sql | 18 +++++
3 files changed, 100 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2013-01-26 02:01:22 pgsql: doc: revert 80c20fcf3df17309b3c131962045825f42e45bc7 and
Previous Message Bruce Momjian 2013-01-25 20:54:39 pgsql: doc: mention commit_delay is only honored if fsync is enabled