CREATE FUNCTION needs an OR REPLACE included.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
delete($_SHARED{"eg_audit_ws"});
$$ LANGUAGE plperl;
-CREATE FUNCTION auditor.create_auditor_history ( sch TEXT, tbl TEXT ) RETURNS BOOL AS $creator$
+CREATE OR REPLACE FUNCTION auditor.create_auditor_history ( sch TEXT, tbl TEXT ) RETURNS BOOL AS $creator$
BEGIN
EXECUTE $$
CREATE TABLE auditor.$$ || sch || $$_$$ || tbl || $$_history (
delete($_SHARED{"eg_audit_ws"});
$$ LANGUAGE plperl;
-CREATE FUNCTION auditor.create_auditor_history ( sch TEXT, tbl TEXT ) RETURNS BOOL AS $creator$
+CREATE OR REPLACE FUNCTION auditor.create_auditor_history ( sch TEXT, tbl TEXT ) RETURNS BOOL AS $creator$
BEGIN
EXECUTE $$
CREATE TABLE auditor.$$ || sch || $$_$$ || tbl || $$_history (