Hi

Ășt 29. 7. 2025 v 14:53 odesĂ­latel Euler Taveira <eu...@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/
>

Reply via email to