Re: event trigger support for PL/Python

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: event trigger support for PL/Python
Дата
Msg-id CAFj8pRA_LmSMt7SRXgu+eF=rWF71ANCkG_wFE_PyVu4a4xjb9A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: event trigger support for PL/Python  ("Euler Taveira" <euler@eulerto.com>)
Ответы Re: event trigger support for PL/Python
Список pgsql-hackers
Hi

út 29. 7. 2025 v 14:53 odesílatel Euler Taveira <euler@eulerto.com> napsal:
On Sun, Jul 20, 2025, at 3:07 AM, Pavel Stehule wrote:
> it is registered in commitfest app?
>
> The patch looks well
>
Ops. I forgot to create one. I registered it now.

https://commitfest.postgresql.org/patch/5939/


I am checking the code, and I don't like too much an introduction of PLPyTrigType - more when it is used in 
the pair with variable is_trigger. This combination looks strange and it is a little bit difficult to read for me.

Maybe I prefer some like

typedef enum {
  PLPY_CALLED_AS_TRIGGER,
  PLPY_CALLED_AS_EVENT_TRIGGER,
  PLPY_CALLED_AS_FUNCTION
} PLPyCallType;

and then instead

if (is_trigger == PLPY_NOT_TRIGGER)

the code can looks like

if (call_type == PLPY_CALLED_AS_FUNCTION)
{

}

What do you think?

Regards

Pavel
 

--
Euler Taveira
EDB   https://www.enterprisedb.com/

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