Hello!

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');

+                               appendStringInfoString(&filters, ", ");
+
+                       appendStringInfo(&filters, "'%s'", str);

Shouldn't this use quote_literal_cstr?


Reply via email to