mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 18:13:18 +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.
14 lines
588 B
SQL
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;
|