timescaledb/sql/updates/2.0.0-rc2--2.0.0-rc3.sql
Sven Klemm 6dddfaa54e Lock down search_path in install scripts
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.
2022-02-09 17:53:20 +01:00

14 lines
588 B
SQL

DROP FUNCTION IF EXISTS @extschema@.add_data_node;
CREATE FUNCTION @extschema@.add_data_node(
node_name NAME,
host TEXT,
database NAME = NULL,
port INTEGER = NULL,
if_not_exists BOOLEAN = FALSE,
bootstrap BOOLEAN = TRUE,
password TEXT = NULL
) RETURNS TABLE(node_name NAME, host TEXT, port INTEGER, database NAME,
node_created BOOL, database_created BOOL, extension_created BOOL)
AS '@MODULE_PATHNAME@', 'ts_data_node_add' LANGUAGE C VOLATILE;