mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 01:53:41 +08:00
Replace EXECUTE PROCEDURE with EXECUTE FUNCTION because the former is deprecated in PG11+. Unfortunately some test output will still have EXECUTE PROCEDURE because pg_get_triggerdef in PG11 still generates a definition with EXECUTE PROCEDURE.
18 lines
893 B
SQL
18 lines
893 B
SQL
-- This file and its contents are licensed under the Apache License 2.0.
|
|
-- Please see the included NOTICE for copyright information and
|
|
-- LICENSE-APACHE for a copy of the license.
|
|
|
|
DROP EVENT TRIGGER IF EXISTS timescaledb_ddl_command_end;
|
|
|
|
CREATE OR REPLACE FUNCTION _timescaledb_internal.process_ddl_event() RETURNS event_trigger
|
|
AS '@MODULE_PATHNAME@', 'ts_timescaledb_process_ddl_event' LANGUAGE C;
|
|
|
|
--EVENT TRIGGER MUST exclude the ALTER EXTENSION tag.
|
|
CREATE EVENT TRIGGER timescaledb_ddl_command_end ON ddl_command_end
|
|
WHEN TAG IN ('ALTER TABLE','CREATE TRIGGER','CREATE TABLE','CREATE INDEX','ALTER INDEX', 'DROP TABLE', 'DROP INDEX', 'DROP SCHEMA')
|
|
EXECUTE FUNCTION _timescaledb_internal.process_ddl_event();
|
|
|
|
DROP EVENT TRIGGER IF EXISTS timescaledb_ddl_sql_drop;
|
|
CREATE EVENT TRIGGER timescaledb_ddl_sql_drop ON sql_drop
|
|
EXECUTE FUNCTION _timescaledb_internal.process_ddl_event();
|