Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8yxv-0004DP-Nu for pgsql-general@arkaria.postgresql.org; Thu, 19 Apr 2018 02:06:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f8yxu-0002iK-Kb for pgsql-general@arkaria.postgresql.org; Thu, 19 Apr 2018 02:06:26 +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.89) (envelope-from ) id 1f8yxu-0002iA-CR for pgsql-general@lists.postgresql.org; Thu, 19 Apr 2018 02:06:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8yxr-0000in-BY for pgsql-general@postgresql.org; Thu, 19 Apr 2018 02:06:25 +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 w3J26KZr002629; Wed, 18 Apr 2018 22:06:20 -0400 From: Tom Lane To: raf@raf.org cc: pgsql-general@postgresql.org Subject: Re: Inconsistent compilation error In-reply-to: <20180419010228.jcogqkeu2b7bxh2q@raf.org> References: <20180419010228.jcogqkeu2b7bxh2q@raf.org> Comments: In-reply-to raf@raf.org message dated "Thu, 19 Apr 2018 11:02:29 +1000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2627.1524103580.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Apr 2018 22:06:20 -0400 Message-ID: <2628.1524103580@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk raf@raf.org writes: > I have a stored function with code that looks like: > raise notice '% %', 'blah_history.original_id', r; > But I'm getting this compilation error when it tries to load this > function: > ERROR: too many parameters specified for RAISE That is ... weird. The code is checking that the number of % symbols in the string literal matches the number of comma-separated expressions after the literal, and it sure looks like those match. > Which looks fine. The really wierd thing is that this happens when done = on a > debian9 host but when I load the function from another host (my macos la= ptop) > with the same function into the same database, it works fine. Weirder yet. The only idea that comes to mind is that '%%', with nothing between the percent signs, means a literal '%' character not two parameter markers. If the contents of the string literal were '%%' then this is exactly the error message you'd get. So here's a long-shot theory: what's in your source code is not a plain space but something weird like a no-break space, and when you transfer that text from machine A to machine B, the no-break space is getting dropped. regards, tom lane