Commit cf3dfea4 authored by Peter Eisentraut's avatar Peter Eisentraut

Change PROCEDURE to FUNCTION in CREATE EVENT TRIGGER syntax

This was claimed to have been done in
0a63f996, but that actually only
changed the documentation and not the grammar.  (That commit did fully
change it for CREATE TRIGGER.)
parent b04aeb0a
......@@ -5578,7 +5578,7 @@ ConstraintAttributeElem:
CreateEventTrigStmt:
CREATE EVENT TRIGGER name ON ColLabel
EXECUTE PROCEDURE func_name '(' ')'
EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')'
{
CreateEventTrigStmt *n = makeNode(CreateEventTrigStmt);
n->trigname = $4;
......@@ -5589,7 +5589,7 @@ CreateEventTrigStmt:
}
| CREATE EVENT TRIGGER name ON ColLabel
WHEN event_trigger_when_list
EXECUTE PROCEDURE func_name '(' ')'
EXECUTE FUNCTION_or_PROCEDURE func_name '(' ')'
{
CreateEventTrigStmt *n = makeNode(CreateEventTrigStmt);
n->trigname = $4;
......
......@@ -27,7 +27,7 @@ create event trigger regress_event_trigger on ddl_command_start
execute procedure test_event_trigger();
-- OK
create event trigger regress_event_trigger_end on ddl_command_end
execute procedure test_event_trigger();
execute function test_event_trigger();
-- should fail, food is not a valid filter variable
create event trigger regress_event_trigger2 on ddl_command_start
when food in ('sandwich')
......
......@@ -28,7 +28,7 @@ create event trigger regress_event_trigger on ddl_command_start
-- OK
create event trigger regress_event_trigger_end on ddl_command_end
execute procedure test_event_trigger();
execute function test_event_trigger();
-- should fail, food is not a valid filter variable
create event trigger regress_event_trigger2 on ddl_command_start
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment