Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-06 Thread Michael Meskes
On Fri, Jul 05, 2013 at 08:08:06AM -0400, Andrew Dunstan wrote: > This looks incomplete. Surely just escaping backslashes alone is not > enough. I suspect at least the " char and any chars below 0x20 > should be quoted also. The " char I just added, however, my tests did bring up any problem with

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-06 Thread Michael Meskes
On Fri, Jul 05, 2013 at 09:41:26AM -0400, Tom Lane wrote: > Um ... 9.3 is a separate branch now, please fix it there also. Done. Seems I missed a new branch - yet again. Sorry and thanks for pointing it out to me. michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-05 Thread Tom Lane
Michael Meskes writes: > On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote: >> not specific to 9.3. Could you commit and backport this? > Committed to 8.4, 9.0, 9.1, 9.2 and HEAD. Um ... 9.3 is a separate branch now, please fix it there also. regards, tom lane --

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-05 Thread Michael Meskes
On Fri, Jul 05, 2013 at 08:08:06AM -0400, Andrew Dunstan wrote: > This looks incomplete. Surely just escaping backslashes alone is not > enough. I suspect at least the " char and any chars below 0x20 > should be quoted also. Right, this didn't even occur to me, but there are surely more characters

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-05 Thread Andrew Dunstan
On 07/05/2013 05:16 AM, Michael Meskes wrote: On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote: not specific to 9.3. Could you commit and backport this? Committed to 8.4, 9.0, 9.1, 9.2 and HEAD. This looks incomplete. Surely just escaping backslashes alone is not enough. I suspect a

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-05 Thread MauMau
From: "Michael Meskes" So that means MauMau was right and backslashes have to be escaped in filenames in #line directives, right? Apparently my examples were badly chosen as I didn't see an error no matter how many backslashes I had. Yes, the below examples shows the case: [maumau@myhost ~]$

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-05 Thread Michael Meskes
On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote: > not specific to 9.3. Could you commit and backport this? Committed to 8.4, 9.0, 9.1, 9.2 and HEAD. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (D

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Michael Meskes
On Thu, Jul 04, 2013 at 03:18:12PM +0200, Andres Freund wrote: > Previous versions of CPP did not interpret escapes in ‘#line’; we have > changed it because the standard requires they be interpreted, and most > other compilers do.« So that means MauMau was right and backslashes have to be escaped

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Andres Freund
On 2013-07-04 09:12:37 -0400, Andrew Dunstan wrote: > > On 07/04/2013 08:58 AM, Andres Freund wrote: > >On 2013-07-04 08:50:34 -0400, Andrew Dunstan wrote: > >>On 07/04/2013 08:31 AM, Michael Meskes wrote: > >>>On Thu, Jul 04, 2013 at 07:58:39AM -0400, Andrew Dunstan wrote: > >michael@feivel:~

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Andrew Dunstan
On 07/04/2013 08:58 AM, Andres Freund wrote: On 2013-07-04 08:50:34 -0400, Andrew Dunstan wrote: On 07/04/2013 08:31 AM, Michael Meskes wrote: On Thu, Jul 04, 2013 at 07:58:39AM -0400, Andrew Dunstan wrote: michael@feivel:~$ grep line testa/init.c |head -1 #line 1 "test\\a/init.pgc" ...

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Andres Freund
On 2013-07-04 08:50:34 -0400, Andrew Dunstan wrote: > > On 07/04/2013 08:31 AM, Michael Meskes wrote: > >On Thu, Jul 04, 2013 at 07:58:39AM -0400, Andrew Dunstan wrote: > >>>michael@feivel:~$ grep line testa/init.c |head -1 > >>>#line 1 "test\\a/init.pgc" > >>... > >> > >>Really? I'd expect to

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Andrew Dunstan
On 07/04/2013 08:31 AM, Michael Meskes wrote: On Thu, Jul 04, 2013 at 07:58:39AM -0400, Andrew Dunstan wrote: michael@feivel:~$ grep line testa/init.c |head -1 #line 1 "test\\a/init.pgc" ... Really? I'd expect to see 4 backslashes in the #line directive, I think. Eh, why? The four backsl

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Michael Meskes
On Thu, Jul 04, 2013 at 07:58:39AM -0400, Andrew Dunstan wrote: > >michael@feivel:~$ grep line testa/init.c |head -1 > >#line 1 "test\\a/init.pgc" > ... > > Really? I'd expect to see 4 backslashes in the #line directive, I think. Eh, why? The four backslashes come are two that are escaped for

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Andrew Dunstan
On 07/04/2013 07:04 AM, Michael Meskes wrote: On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote: I happened to find a trivial bug of ECPG while experimenting with 9.3 beta 2. Please find attached the patch to fix this. This is not specific to 9.3. Could you commit and backport this? Th

Re: [HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-04 Thread Michael Meskes
On Wed, Jul 03, 2013 at 07:22:48PM +0900, MauMau wrote: > I happened to find a trivial bug of ECPG while experimenting with > 9.3 beta 2. Please find attached the patch to fix this. This is > not specific to 9.3. Could you commit and backport this? This appears to be Windows specific. I don't h

[HACKERS] [9.3 bug fix] ECPG does not escape backslashes

2013-07-03 Thread MauMau
Hello, I happened to find a trivial bug of ECPG while experimenting with 9.3 beta 2. Please find attached the patch to fix this. This is not specific to 9.3. Could you commit and backport this? [Bug description] Running "ecpg c:\command\a.pgc" produces the following line in a.c: #line 1