Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg and psql

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: andrew5(at)ece(dot)cmu(dot)edu,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>,PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #2171: Differences compiling plpgsql in ecpg and psql
Date: 2006-02-06 20:33:16
Message-ID: 20060206203316.GA9025@1 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-interfacespgsql-patches
On Wed, Feb 01, 2006 at 11:48:45PM -0500, Bruce Momjian wrote:
> I have researched your report, and you are right, there are two ecpg
> bugs here.  First, dollar quoting uses single-quotes internally to do
> the quoting, but it does not double any single-quotes in the
> dollar-quoted string.

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.

> Second, when a dollar quoted string or single-quoted string spans
> multiple lines, ecpg does not escape the newline that is part of the
> string.  Some compilers will accept an unescaped newline in a string,
> while others will not:

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.

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(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

pgsql-bugs by date

Next:From: Jim C. NasbyDate: 2006-02-06 23:54:05
Subject: SELECT max() won't use a NOT NULL index
Previous:From: Márcio A. SeppDate: 2006-02-06 20:15:32
Subject: Problems with createlang - windows

pgsql-interfaces by date

Next:From: Christoph ZwerschkeDate: 2006-02-06 23:27:59
Subject: Re: PQprint under Windows
Previous:From: Christoph ZwerschkeDate: 2006-02-06 09:43:38
Subject: Re: PQprint under Windows

pgsql-patches by date

Next:From: P. Scott DeVosDate: 2006-02-06 22:05:37
Subject: plpython tracebacks
Previous:From: Tom LaneDate: 2006-02-06 19:10:29
Subject: Re: slow information schema with thausand users, seq.scan pg_authid

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group