Re: BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE
Дата
Msg-id CAKFQuwao9dOav1xPJW_tOhJpES9vO0XjmWLSqVtahyTAf15siw@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On Fri, Aug 5, 2022 at 10:02 AM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17576
Logged by:          Gabriel Rodrigues Franco
Email address:      gabriel.franco@quintoandar.com.br
PostgreSQL version: 13.4
Operating system:   Its and Amazon RDS
Description:       

Hello PostgreSQL team,

I have a FUNCTION that needs to be executed after any object creation
(tables, functions, procedures...), and it is triggering as expected for any
DDL operation against tables and functions, but not for PROCEDURES.

CREATE EVENT TRIGGER tg_change_obj_owner ON ddl_command_end
        EXECUTE FUNCTION public.pg_change_obj_owner();

I saw in the Matrix that this was not supposed to happen:
https://www.postgresql.org/docs/current/event-trigger-matrix.html

Could you help me?


I cannot reproduce this.

vagrant@vagrant:/usr/local/pgsql/bin$ ./psql postgres
psql (13.4)
Type "help" for help.

postgres=# create function evt_warn() returns event_trigger as $$begin raise exception 'Event'; end; $$ language plpgsql;
CREATE FUNCTION
postgres=# create table evt_table ( id serial primary key) ;
CREATE TABLE
postgres=# CREATE EVENT TRIGGER tg_change_obj_owner ON ddl_command_end
        EXECUTE FUNCTION public.evt_warn();
CREATE EVENT TRIGGER
postgres=# create table evt_table ( id serial primary key) ;
ERROR:  relation "evt_table" already exists
postgres=# create procedure evt_warn_proc() as $$begin raise notice 'Notice'; end;$$ language plpgsql;
ERROR:  Event
CONTEXT:  PL/pgSQL function evt_warn() line 1 at RAISE
postgres=#

I suggest upgrading your RDS to the most current version available, trying again, and if you still have issues contact AWS for support.

Feel free to provide a self-contained producer and output from your environment here if you'd like though.  It will be informative even if the problem really is with RDS.

David J.

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17576: Event_trigger ddl_command_end not firing during CREATE PROCEDURE