Re: Completing PL support for Event Triggers

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Completing PL support for Event Triggers
Дата
Msg-id 1385467181.13003.2.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: Completing PL support for Event Triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: Completing PL support for Event Triggers  (Peter Eisentraut <peter_e@gmx.net>)
Re: Completing PL support for Event Triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
I made one significant change in the PL/Perl patch. You had this in
plperl_event_trigger_handler():

+       /*
+        * Create the call_data before connecting to SPI, so that it is not
+        * allocated in the SPI memory context
+        */
+       current_call_data = (plperl_call_data *) palloc0(sizeof(plperl_call_data));
+       current_call_data->fcinfo = fcinfo;

I think this is wrong, and the reason it crashes if you remove it is
that you need to call increment_prodesc_refcount(prodesc), like in the
other handlers.

Attached is my "final" patch.  Let me know if it's OK for you.


Вложения

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Get more from indices.
Следующее
От: Rajeev rastogi
Дата:
Сообщение: Re: TODO: Split out pg_resetxlog output into pre- and post-sections