Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zbx_deprovision_partitions errors #9

Open
36below opened this issue Sep 4, 2018 · 1 comment
Open

zbx_deprovision_partitions errors #9

36below opened this issue Sep 4, 2018 · 1 comment

Comments

@36below
Copy link

36below commented Sep 4, 2018

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
Copy link
Author

36below commented Sep 5, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant