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 1fBIyT-0003Nf-Td for pgsql-general@arkaria.postgresql.org; Wed, 25 Apr 2018 11:52:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBIyS-0004AD-W2 for pgsql-general@arkaria.postgresql.org; Wed, 25 Apr 2018 11:52:36 +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 1fBIyS-0004A4-O3 for pgsql-general@lists.postgresql.org; Wed, 25 Apr 2018 11:52:36 +0000 Received: from ook.raf.org ([139.99.156.21]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBIyP-00032u-Pu for pgsql-general@lists.postgresql.org; Wed, 25 Apr 2018 11:52:36 +0000 Received: from localhost (localhost [127.0.0.1]) by ook.raf.org (Postfix) with ESMTP id 06FCA5E4EB for ; Wed, 25 Apr 2018 21:52:30 +1000 (AEST) X-Virus-Scanned: Debian amavisd-new at ook.raf.org Received: from ook.raf.org ([127.0.0.1]) by localhost (ook.raf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BUYLFAjX5VA4 for ; Wed, 25 Apr 2018 21:52:28 +1000 (AEST) Received: by ook.raf.org (Postfix, from userid 1001) id E6A9C5E51D; Wed, 25 Apr 2018 21:52:28 +1000 (AEST) Date: Wed, 25 Apr 2018 21:52:28 +1000 From: raf@raf.org To: pgsql-general@lists.postgresql.org Subject: Re: Inconsistent compilation error Message-ID: <20180425115228.vwci6ylgnjyxrcov@raf.org> References: <20180419010228.jcogqkeu2b7bxh2q@raf.org> <2628.1524103580@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2628.1524103580@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane wrote: > 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 laptop) > > 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 thanks but it is normal space character.