Implicitly created operator family not listed by pg_event_trigger_ddl_commands
От | LEMAIRE Leslie (Chargée de mission) - SG/SNUM/UNI/DRC |
---|---|
Тема | Implicitly created operator family not listed by pg_event_trigger_ddl_commands |
Дата | |
Msg-id | f74d69e151b22171e8829551b1159e77@developpement-durable.gouv.fr обсуждение исходный текст |
Ответы |
Re: Implicitly created operator family not listed by pg_event_trigger_ddl_commands
|
Список | pgsql-bugs |
Hi, I have an event trigger firing at command end on "CREATE OPERATOR CLASS", "CREATE OPERATOR FAMILY" and every other creation command of schema dependent objects. As stated in the documentation [1], creating an operator class without specifying the FAMILY option will create an operator family with the same name as the new class if it doesn't already exist. In this case, my event trigger is activated through the "CREATE OPERATOR CLASS" tag as usual, but pg_event_trigger_ddl_commands() still returns only one row - for the operator class creation. I would have expected it to list the creation of the operator family as well. Since event triggers don't catch implicit commands [2], the "CREATE OPERATOR FAMILY" tag is useless here and the operator family creation is never detected. I observed this with PostgreSQL 14.2 (Windows 10, Visual C++ build 1914, 64-bit) and PostgreSQL 10.12 (Windows 10, Visual C++ build 1800, 64-bit), so it's likely not a version specific issue. The documentation doesn't say much about pg_event_trigger_ddl_commands() [3], but I would assume it's meant to be as exhaustive as possible, hence this bug report. By comparison, with an event trigger firing at command end on "CREATE TABLE" and a command such as "CREATE TABLE my_table (id serial PRIMARY KEY)", pg_event_trigger_ddl_commands() would return four rows, including the sequence creation and the index creation. Thanks in advance and sorry if I'm just missing something here. Regards, [1] https://www.postgresql.org/docs/14/sql-createopclass.html [2] I don't think it's documented anywhere, but this seems to be a consistant behaviour and it makes sense as long as pg_event_trigger_ddl_commands() does the work. [3] https://www.postgresql.org/docs/14/functions-event-triggers.html -- Leslie Lemaire Secrétariat général des ministères de la transition écologique, de la cohésion des territoires et de la mer Service du numérique
В списке pgsql-bugs по дате отправления: