mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
Change PROCEDURE to FUNCTION in CREATE TRIGGER syntax
Since procedures are now a different thing from functions, change the CREATE TRIGGER and CREATE EVENT TRIGGER syntax to use FUNCTION in the clause that specifies the function. PROCEDURE is still accepted for compatibility. pg_dump and ruleutils.c output is not changed yet, because that would require a change in information_schema.sql and thus a catversion change. Reported-by: Peter Geoghegan <pg@bowt.ie> Reviewed-by: Jonathan S. Katz <jonathan.katz@excoventures.com>
This commit is contained in:
@@ -1300,7 +1300,7 @@ $$ LANGUAGE plperl;
|
||||
|
||||
CREATE TRIGGER test_valid_id_trig
|
||||
BEFORE INSERT OR UPDATE ON test
|
||||
FOR EACH ROW EXECUTE PROCEDURE valid_id();
|
||||
FOR EACH ROW EXECUTE FUNCTION valid_id();
|
||||
</programlisting>
|
||||
</para>
|
||||
</sect1>
|
||||
@@ -1350,7 +1350,7 @@ $$ LANGUAGE plperl;
|
||||
|
||||
CREATE EVENT TRIGGER perl_a_snitch
|
||||
ON ddl_command_start
|
||||
EXECUTE PROCEDURE perlsnitch();
|
||||
EXECUTE FUNCTION perlsnitch();
|
||||
</programlisting>
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
Reference in New Issue
Block a user