Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aem1H-0002bN-3k for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Mar 2016 16:03:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aem1G-0004Xr-HW for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Mar 2016 16:03:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aem1G-0004Xl-5U for pgsql-bugs@postgresql.org; Sat, 12 Mar 2016 16:03:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aem1D-00013S-HH for pgsql-bugs@postgresql.org; Sat, 12 Mar 2016 16:03:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u2CG3nll013688; Sat, 12 Mar 2016 11:03:50 -0500 From: Tom Lane To: anthony@arkia.nl cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14017: strange syntax error In-reply-to: <20160312100950.8904.56439@wrigleys.postgresql.org> References: <20160312100950.8904.56439@wrigleys.postgresql.org> Comments: In-reply-to anthony@arkia.nl message dated "Sat, 12 Mar 2016 10:09:50 +0000" Date: Sat, 12 Mar 2016 11:03:49 -0500 Message-ID: <13687.1457798629@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 anthony@arkia.nl writes: > 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... ISNULL is a keyword; it's a short form of IS NULL. It's only by pure chance that you've ever been able to use this function: > CREATE OR REPLACE FUNCTION public."isnull"( without double-quoting its name everywhere. The fact that it accidentally worked in this context before 9.5, but fails now, probably has something to do with the changes we made in 9.5 to give IS NULL the syntactic precedence required by the SQL standard. You could rename the function to something that doesn't conflict, like "is_null". But really my recommendation is to drop it entirely and use COALESCE(), which does the same thing, is considerably more efficient, and is SQL-standard. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs