plpython trigger code is wrong (Re: [GENERAL] Potential bug -- script that drops postgres server)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема plpython trigger code is wrong (Re: [GENERAL] Potential bug -- script that drops postgres server)
Дата
Msg-id 12501.1045269213@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: plpython trigger code is wrong (Re: [GENERAL] Potential bug -- script that drops postgres server)
Список pgsql-hackers
Lance Thomas <LThomas@DevIS.com> writes:
> Below is something that may be of interest -- a short, 7-statement script
> that seems to drop my postgres server.

It appears that the plpython trigger implementation assumes that any
given procedure will be used as a trigger for only one relation.  The
reason it crashes is it's trying to use the rowtype info of the relation
it was first compiled for with the other relation.

Probably the easiest fix is to include the relation OID as part of the
Python name of a trigger procedure, so that a separate copy is compiled
for each relation the procedure is used with.

Any plpython users want to step forward and fix this?  I have other
things on my plate ...

            regards, tom lane

PS: I haven't tested, but I wonder whether any of our other PLs have the
same bug.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Linux.conf.au 2003 Report
Следующее
От: Tom Lane
Дата:
Сообщение: Re: client_encoding directive is ignored in