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

2006-02-04 Thread Andrew Klosterman
As to my opinion on affecting any work-arounds: I got around this issue by not line wrapping my long strings in EXEC SQL ... statements that ecpg processes. I would edit the plpgsql function that I was writing in an external editor, make sure it installed by copypaste into the psql window, and

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

2006-02-03 Thread Bruce Momjian
Andrew Klosterman wrote: As to my opinion on affecting any work-arounds: I got around this issue by not line wrapping my long strings in EXEC SQL ... statements that ecpg processes. I would edit the plpgsql function that I was writing in an external editor, make sure it installed by

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

2006-02-03 Thread Bruce Momjian
Applied to CVS HEAD. No backpatching. --- Bruce Momjian wrote: Here is an updated patch. It fixes things in the places it should be fixed by handling \n at the time we double-quote, and double single quotes at the

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

2006-02-02 Thread Bruce Momjian
Andrew Dunstan wrote: On Wed, 2006-02-01 at 23:48 -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

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

2006-02-02 Thread Bruce Momjian
Here is an updated patch. It fixes things in the places it should be fixed by handling \n at the time we double-quote, and double single quotes at the place we are building the $$ string. I am going to apply this to HEAD. It is a fix, but I am worried it might affect ecpg users who might have

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

2006-02-01 Thread Bruce Momjian
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. Second, when a dollar quoted string or single-quoted string spans multiple