Re: event trigger support for PL/Python

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: event trigger support for PL/Python
Date: 2025-08-06 20:16:06
Message-ID: CAFj8pRA_LmSMt7SRXgu+eF=rWF71ANCkG_wFE_PyVu4a4xjb9A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

út 29. 7. 2025 v 14:53 odesílatel Euler Taveira <euler(at)eulerto(dot)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/
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shankaran, Akash 2025-08-06 20:28:40 RE: SIMD optimization for list_sort
Previous Message Florents Tselai 2025-08-06 19:42:48 Re: encode/decode support for base64url