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

2019-12-22 Thread Andrei Pozolotin
l_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 writes: 1. any attempt to define python fun

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

2019-12-22 Thread Andrei Pozolotin
19-12-22 16:07, Jeff Ross wrote: On 2019-12-22 15:27, Andrei Pozolotin wrote: Hello. Problem: 1. any attempt to define python function as an event_trigger, i.e.: CREATE FUNCTION public.verify() RETURNS event_trigger LANGUAGE 'plpython3u' AS $$ print("hello-kitty") $$;

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

2019-12-22 Thread Andrei Pozolotin
Hello. Problem: 1. any attempt to define python function as an event_trigger, i.e.: CREATE FUNCTION public.verify() RETURNS event_trigger LANGUAGE 'plpython3u' AS $$ print("hello-kitty") $$; 2. fails with message: ERROR: trigger functions can only be called as triggers SQL state: 0A000