Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gOnLN-0001jl-3l for pgsql-general@arkaria.postgresql.org; Mon, 19 Nov 2018 17:28:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gOnLK-0002RM-OC for pgsql-general@arkaria.postgresql.org; Mon, 19 Nov 2018 17:28:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gOn6X-0008Rj-E6 for pgsql-general@lists.postgresql.org; Mon, 19 Nov 2018 17:12:57 +0000 Received: from smtp1.redcom.com ([192.86.3.143]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gOn6U-0001fk-Fh for pgsql-general@postgresql.org; Mon, 19 Nov 2018 17:12:55 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp1.redcom.com (Postfix) with ESMTP id 8B06CA043 for ; Mon, 19 Nov 2018 12:12:53 -0500 (EST) X-Virus-Scanned: amavisd-new at redcom.com Received: from smtp1.redcom.com ([127.0.0.1]) by localhost (smtp1.redcom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fZm7TLJv2kWg for ; Mon, 19 Nov 2018 12:12:51 -0500 (EST) Received: from pie.redcom.com (pie [192.168.33.15]) by smtp1.redcom.com (Postfix) with ESMTP id C8820A014 for ; Mon, 19 Nov 2018 12:12:51 -0500 (EST) Received: from exch-02.redcom.com (exch-02.redcom.com [192.168.32.9]) by pie.redcom.com (8.11.7p1+Sun/8.10.2) with ESMTP id wAJHCpl14507 for ; Mon, 19 Nov 2018 12:12:51 -0500 (EST) Received: from exch-02.redcom.com (fd00::ccaa:c259:22f8:6f4b) by exch-02.redcom.com (fd00::ccaa:c259:22f8:6f4b) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Mon, 19 Nov 2018 12:12:51 -0500 Received: from exch-02.redcom.com ([fe80::ccaa:c259:22f8:6f4b]) by exch-02.redcom.com ([fe80::ccaa:c259:22f8:6f4b%12]) with mapi id 15.00.1178.000; Mon, 19 Nov 2018 12:12:51 -0500 From: "Day, David" To: "pgsql-general@postgresql.org" Subject: plpgsql and intarray extension; int[] - int[] operator does not exist ? Thread-Topic: plpgsql and intarray extension; int[] - int[] operator does not exist ? Thread-Index: AdSAKqyqKdOMlhymQ+C3Cnw+WA1+cg== Date: Mon, 19 Nov 2018 17:12:50 +0000 Message-ID: <0fd14b7dff1741b988d4f907af745cc4@exch-02.redcom.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.168.84.42] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I have installed the intarray extension installed in the public schema and = am attempting to use this in a plpgsql trigger function from another schem= a. When the triggers executes this I get an exception to the effect=20 { "hint": "No operator matches the given name and argument type(s). You m= ight need to add explicit type casts.", "details": null, "code": "42883", "message": "operator does not exist: integer[] - integer[]" } However, If I write a similar test function and attempt similar array arit= hmetic successfully from a different schema in a non-trigger function It re= cognizes the intarray methods. CREATE OR REPLACE FUNCTION admin.djd_test() RETURNS integer[] AS $BODY$ DECLARE _old_tag_ids INTEGER[]; _new_tag_ids INTEGER[]; =20 BEGIN _old_tag_ids :=3D ARRAY[1,2,3]; _new_tag_ids :=3D ARRAY[3,4,5]; RETURN _old_tag_ids - _new_tag_ids; END; $BODY$ LANGUAGE plpgsql VOLATILE Of course in the trigger function the declared int[] arrays the content i= s dynamically initialized. Any suggestions as to why the int[] operations are not understood in the tr= igger context.? . Thanks Dave Day