Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aegVS-00074k-4T for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Mar 2016 10:10:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aegVR-0000JL-KD for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Mar 2016 10:10:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aegUo-00080o-Iq for pgsql-bugs@postgresql.org; Sat, 12 Mar 2016 10:10:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aegUl-0001wi-Kh for pgsql-bugs@postgresql.org; Sat, 12 Mar 2016 10:10:05 +0000 MIME-Version: 1.0 Subject: BUG #14017: strange syntax error To: pgsql-bugs@postgresql.org From: anthony@arkia.nl Date: Sat, 12 Mar 2016 10:09:50 +0000 Message-ID: <20160312100950.8904.56439@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 14017 Logged by: Anthony van den Berg Email address: anthony@arkia.nl PostgreSQL version: 9.5.1 Operating system: linux both fedra and ubuntu Description: When running the create or replace function on the following I get this error ERROR: syntax error at or near "(" LINE 5: ...trim(isnull(new.straat,''::text) || ' ' || isnull ( new.hui... in postgresql 9.4.5 it gives no problem I have no idea why this happens ans the first isnull call is exactly the same als the second CREATE OR REPLACE FUNCTION relaties.update_insert_adressen() RETURNS trigger AS $BODY$ BEGIN new.adres = trim(isnull(new.straat,''::text) || ' ' || isnull ( new.huisnummer,''::text)); return new; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION relaties.update_insert_adressen() OWNER TO postgres; the isnull function looks like this. CREATE OR REPLACE FUNCTION public."isnull"( text, text) RETURNS text AS $BODY$SELECT (CASE (SELECT $1 is null) WHEN true THEN $2 ELSE $1 END) AS RESULT$BODY$ LANGUAGE sql VOLATILE COST 100; ALTER FUNCTION public."isnull"(text, text) OWNER TO postgres; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs