zabbix-pgsql-partitioning icon indicating copy to clipboard operation
zabbix-pgsql-partitioning copied to clipboard

zbx_deprovision_partitions errors

Open 36below opened this issue 7 years ago • 1 comments

When running the bootstrap.sql agains Postgres 8.4.20 I got:

ERROR: "$2" is declared CONSTANT SQL state: 22005 Context: compilation of PL/pgSQL function "zbx_deprovision_partitions" near line 7

Fixed by : DECLARE child RECORD; ins_count INTEGER DEFAULT 0; new_trigger_name TEXT DEFAULT ''; BEGIN -- default trigger name IF trigger_name = '' THEN new_trigger_name := table_name || '_insert'; ELSE new_trigger_name := trigger_name; END IF;

	-- delete the insert trigger on the parent table
	EXECUTE 'DROP TRIGGER ' || new_trigger_name || ' ON ' || schema_name || '.' || table_name || ' CASCADE;';

36below avatar Sep 04 '18 00:09 36below

I've run up a new VM with Postgres 9.6 and it works fine on that

36below avatar Sep 05 '18 03:09 36below