Re: Inconsistent compilation error - Mailing list pgsql-general

From raf@raf.org
Subject Re: Inconsistent compilation error
Date
Msg-id 20180425115228.vwci6ylgnjyxrcov@raf.org
Whole thread Raw
In response to Re: Inconsistent compilation error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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.



pgsql-general by date:

Previous
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: [ClusterLabs] 答复: 答复: Postgres PAFsetup
Next
From: raf
Date:
Subject: Re: Inconsistent compilation error