Thread: ECPG fetch broken after upgrade to 6.5
Hi! Has anyone else had this problem? I have two programs that ECPG processes flawlessly under 6.4. However, under 6.5, I get: ml1.sql:364: parse error line 364 is: EXEC SQL FETCH pick_ip INTO :tWatMacAddress; Also of note: One of my programs contained no SQL code. However, I tend to run it through ecpg out of habit. The old version would (correctly) leave things alone. However, the new version grabs double slashes, even if they are embedded in within double quotes. It turned these two lines: printf("<FORM METHOD=POST ACTION=\"http://pm2/cgi-bin/macs/ml1\">\n"); printf("Select the type of address, enterit into the form and \n"); Into this (all one line): printf("<FORM METHOD=POST ACTION=\"http: printf("Select the type of address, enter it into the form and \n"); TIA Phil -- pmoors@phillips.com | Speaking for himself only. -------------------------------------------------------- cat /dev/coffee | /dev/cup | /dev/mouth | /dev/nose > /dev/keyboard
On Wed, Jun 23, 1999 at 06:52:05PM -0400, Phil Moors wrote: > printf("<FORM METHOD=POST ACTION=\"http://pm2/cgi-bin/macs/ml1\">\n"); Got it. It interprets // as a start of a comment. Any idea how to make the lex code parse this correctly? I will definitely think about it. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!
On Wed, Jun 23, 1999 at 06:52:05PM -0400, Phil Moors wrote: > ml1.sql:364: parse error > > line 364 is: EXEC SQL FETCH pick_ip INTO :tWatMacAddress; That one is correct since the stabdard syntax is: EXEC SQL FETCH IN pick_ip INTO :tWatMacAddress; > Also of note: > > One of my programs contained no SQL code. However, I tend to run it through ecpg > out of habit. The old version would (correctly) leave things alone. However, the > new version grabs double slashes, even if they are embedded in within double > quotes. It turned these two lines: > > printf("<FORM METHOD=POST ACTION=\"http://pm2/cgi-bin/macs/ml1\">\n"); > printf("Select the type of address, enter it into the form and \n"); > > Into this (all one line): > > printf("<FORM METHOD=POST ACTION=\"http: printf("Select the type of > address, enter it into the form and \n"); This looks like a bug. I have to check that. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!
On Wed, Jun 23, 1999 at 06:52:05PM -0400, Phil Moors wrote: > printf("<FORM METHOD=POST ACTION=\"http://pm2/cgi-bin/macs/ml1\">\n"); > printf("Select the type of address, enter it into the form and \n"); The problem was the quoted ". I've fixed this and will commit my changes asap. Michael -- Michael Meskes | Go SF 49ers! Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire! Tel.: (+49) 2431/72651 | Use Debian GNU/Linux! Email: Michael.Meskes@gmx.net | Use PostgreSQL!
Michael Meskes wrote: > > On Wed, Jun 23, 1999 at 06:52:05PM -0400, Phil Moors wrote: > > printf("<FORM METHOD=POST ACTION=\"http://pm2/cgi-bin/macs/ml1\">\n"); > > printf("Select the type of address, enter it into the form and \n"); > > The problem was the quoted ". I've fixed this and will commit my changes > asap. > > Michael Michael, Thank you very much for your time and assistance. Phil -- pmoors@phillips.com | Speaking for himself only. -------------------------------------------------------- Every definition is dangerous. --Erasmus