mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-14 17:43:34 +08:00
This patch locks down search_path in extension install and update scripts to only contain pg_catalog, this requires that any reference in those scripts is fully qualified. Additionally we add explicit create commands to all update scripts for objects added to the public schema. This change will make update scripts fail if a function with identical signature already exists when installing or upgrading instead reusing the existing object.
16 lines
895 B
SQL
16 lines
895 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.
|
|
|
|
-- Trigger that blocks INSERTs on the hypertable's root table
|
|
CREATE OR REPLACE FUNCTION _timescaledb_internal.insert_blocker() RETURNS trigger
|
|
AS '@MODULE_PATHNAME@', 'ts_hypertable_insert_blocker' LANGUAGE C;
|
|
|
|
-- Records mutations or INSERTs which would invalidate a continuous aggregate
|
|
CREATE OR REPLACE FUNCTION _timescaledb_internal.continuous_agg_invalidation_trigger() RETURNS TRIGGER
|
|
AS '@MODULE_PATHNAME@', 'ts_continuous_agg_invalidation_trigger' LANGUAGE C;
|
|
|
|
CREATE OR REPLACE FUNCTION @extschema@.set_integer_now_func(hypertable REGCLASS, integer_now_func REGPROC, replace_if_exists BOOL = false) RETURNS VOID
|
|
AS '@MODULE_PATHNAME@', 'ts_hypertable_set_integer_now_func'
|
|
LANGUAGE C VOLATILE STRICT;
|