Arthur Ward <ward005@bama.ua.edu> writes:
> I'm running "PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by
> GCC gcc (GCC) 3.2.2", and seeing a problem in trigger functions
> written in plpython.
There is a known bug with applying the same plpython trigger function to
multiple tables that have different rowtypes --- the rowtype info gets
cached for the first table the function is used with in a session, and
then inappropriately reused with the other tables. Does this seem to
describe your observations?
Someone had promised to supply a fix, but I haven't seen it yet.
In the meantime the only known workaround is to create multiple
copies of the plpython function, one for each trigger.
regards, tom lane