Обсуждение: Missing tags ALTER ROUTINE and DROP ROUTINE in Event Trigger Firing Matrix

Поиск
Список
Период
Сортировка

Missing tags ALTER ROUTINE and DROP ROUTINE in Event Trigger Firing Matrix

От
PG Doc comments form
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/event-trigger-matrix.html
Description:

Hi,

"ALTER ROUTINE" and "DROP ROUTINE" are not listed in the "Event Trigger
Firing Matrix" documentation page, even though these tags seem supported
from PostgreSQL 11 onwards.

It would be really usefull to mention them, since alterations and deletions
of functions and procedures through ALTER ROUTINE and DROP ROUTINE commands
won't be caught by a trigger firing only on "ALTER PROCEDURE" and "ALTER
FUNCTION" tags (respectively "DROP PROCEDURE" and "DROP FUNCTION" tags).

Best regards,
--
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

Re: Missing tags ALTER ROUTINE and DROP ROUTINE in Event Trigger Firing Matrix

От
Michael Paquier
Дата:
Hi Leslie,

On Sat, Mar 05, 2022 at 10:15:33AM +0000, PG Doc comments form wrote:
> "ALTER ROUTINE" and "DROP ROUTINE" are not listed in the "Event Trigger
> Firing Matrix" documentation page, even though these tags seem supported
> from PostgreSQL 11 onwards.
>
> It would be really useful to mention them, since alterations and deletions
> of functions and procedures through ALTER ROUTINE and DROP ROUTINE commands
> won't be caught by a trigger firing only on "ALTER PROCEDURE" and "ALTER
> FUNCTION" tags (respectively "DROP PROCEDURE" and "DROP FUNCTION" tags).

Thanks for the report.  Indeed, the table is missing that ALTER
ROUTINE would fire the events ddl_command_start and ddl_command_end.
DROP ROUTINE fires on sql_drop, ddl_command_start and
ddl_command_end.  I have applied a patch to add this information
to the docs down to 11.

Regards,
--
Michael

Вложения