Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg and psql - Mailing list pgsql-interfaces

From Michael Meskes
Subject Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg and psql
Date
Msg-id 200602090914.58790.meskes@postgresql.org
Whole thread Raw
In response to Re: [BUGS] BUG #2171: Differences compiling plpgsql in  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-interfaces
> > Actually ecpg should not translate dollar quoting at all. I'm going to
> > fix this. Dollar quotes will then be send to the backend with
> > translation and the backend takes care of the rest.
>
> Well, CVS version before I modified it had "dolq" stuff in the lexer to
> handle dollar quotes and pass it as SCONST to the parser.

Yes, I know. This was buggy from the get go on IMO. :-)

> > Not sure, but there appears to be a bug in the routine that outputs a
> > statement. I will change that one as well and would ask you to just
> > check again. It seems to me that this also fixes your problem. I tried
> > with the one test case in this email and it seems to work. But then I'm
> > currently travelling and do not have that much spare time to test.
>
> The problem is that output.c does:
>
>     printf("abc
>     def");
>
> While some compilers are OK with that, others are not.  I changed it to
> output:
>
>     printf("abc\n\
>     def");

Okay, will look into this again.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

pgsql-interfaces by date:

Previous
From: Micah Desjardins
Date:
Subject: Apache 2.2 and mod_authn_dbd
Next
From: Christoph Zwerschke
Date:
Subject: Finding the pqlib version