[Lada-commits] [PATCH] Do not redefine existing operator
Wald Commits
scm-commit at wald.intevation.org
Fri Mar 17 13:27:56 CET 2017
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1489753557 -3600
# Node ID 84bb7e2aecb18a9d188648d42c1efed297b3a36e
# Parent 1a3e86f4d7683c8881b80d92796c2b98850315c1
Do not redefine existing operator.
The removed SQL failed on PostgreSQL 9.5 because the operator is
provided and needed by the system. Further, it does not seem to be
used here.
diff -r 1a3e86f4d768 -r 84bb7e2aecb1 db_schema/audit.sql
--- a/db_schema/audit.sql Fri Mar 17 13:00:31 2017 +0100
+++ b/db_schema/audit.sql Fri Mar 17 13:25:57 2017 +0100
@@ -50,24 +50,6 @@
COMMENT ON OPERATOR - (jsonb, text[]) IS 'delete keys from left operand';
-CREATE OR REPLACE FUNCTION jsonb_delete_left(a jsonb, b text)
- RETURNS jsonb AS
- $BODY$
- SELECT COALESCE(
- (
- SELECT ('{' || string_agg(to_json(key) || ':' || value, ',') || '}')
- FROM jsonb_each(a)
- WHERE key <> b
- )
- , '{}')::jsonb;
- $BODY$
-LANGUAGE sql IMMUTABLE STRICT;
-COMMENT ON FUNCTION jsonb_delete_left(jsonb, text) IS 'delete key in second argument from first argument';
-DROP OPERATOR IF EXISTS - (jsonb, text);
-CREATE OPERATOR - ( PROCEDURE = jsonb_delete_left, LEFTARG = jsonb, RIGHTARG = text);
-COMMENT ON OPERATOR - (jsonb, text) IS 'delete key from left operand';
-
-
CREATE OR REPLACE FUNCTION if_modified_func() RETURNS TRIGGER AS $body$
DECLARE
audit_row land.audit_trail;
More information about the Lada-commits
mailing list