2026年7月18日(土) 6:26 Zsolt Parragi <
zsolt.parragi@percona.com>:
>
> Hello!
Thanks for the review!
> Should the function preserve the disabled state of an event trigger?
>
> CREATE FUNCTION noop_evt() RETURNS event_trigger LANGUAGE plpgsql AS $$
> BEGIN
> END;
> $$;
> CREATE EVENT TRIGGER my_evt ON ddl_command_start EXECUTE FUNCTION noop_evt();
> ALTER EVENT TRIGGER my_evt DISABLE;
> SELECT pg_get_event_trigger_ddl('my_evt', false);
>
> also REPLICA:
>
> ALTER EVENT TRIGGER my_evt ENABLE REPLICA;
> SELECT pg_get_event_trigger_ddl('my_evt', false);
>
> and OWNER:
>
> CREATE ROLE evt_owner_role SUPERUSER;
> ALTER EVENT TRIGGER my_evt OWNER TO evt_owner_role;
> SELECT pg_get_event_trigger_ddl('my_evt');
Correct.
> + appendStringInfoString(&filters, ", ");
> +
> + appendStringInfo(&filters, "'%s'", str);
>
> Shouldn't this use quote_literal_cstr?
Arguably it wouldn't strictly need to, as we'd only ever get plain ASCII command tags here,
but it's not a critical performance choke point or anything, so might as well use it to be
on the safe side.
Updated patch version attached.
Regards
Ian Barwick