Re: Question: what is proper way to define python function as event_trigger?

From: Andrei Pozolotin <andrei(dot)pozolotin(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Question: what is proper way to define python function as event_trigger?
Date: 2019-12-23 02:53:20
Message-ID: 4e7649dbb7d058ccc5a492793feca49e@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom, hi:

1. actual use case has to do with:
BUG #16177: pg_event_trigger_ddl_commands() returns empty set for
ddl_command_start and "drop table"
https://www.postgresql.org/message-id/16177-053a34714817c3e1%40postgresql.org

2. I was merely hoping to re-implement pg_event_trigger_ddl_commands as
part of python event_trigger

3. do you think "pg_event_trigger_ddl_commands" is any easier to fix
then "support event_trigger in python"?

Thank you,

Andrei

On 2019-12-22 17:40, Tom Lane wrote:
> Andrei Pozolotin <andrei(dot)pozolotin(at)gmail(dot)com> writes:
>> 1. any attempt to define python function as an event_trigger, i.e.:
>
> AFAICS, there's not really any event trigger support in plpython.
> That feature has only been built out in the other three PLs.
>
> Somebody oughta fix this sometime, I guess, but it evidently hasn't
> been high priority. If you feel like working on it, you could look
> at commits e5dc4cc24d2e1e94ac572a2c64103710bf15d21e (for plperl)
> and/or a5036ca998a6058f60913d43a80badfcbb65f5bb (for pltcl).
>
> regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daulat Ram 2019-12-23 03:38:12 Re: pg_basebackup
Previous Message Andrei Pozolotin 2019-12-23 02:52:23 Re: Question: what is proper way to define python function as event_trigger?