Re: Inconsistent compilation error

From: raf(at)raf(dot)org
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Inconsistent compilation error
Date: 2018-04-25 11:52:28
Message-ID: 20180425115228.vwci6ylgnjyxrcov@raf.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

> raf(at)raf(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message raf 2018-04-25 11:54:01 Re: Inconsistent compilation error
Previous Message Jehan-Guillaume de Rorthais 2018-04-25 08:32:32 Re: [ClusterLabs] 答复: 答复: Postgres PAF setup