dbTalk Databases Forums  

[BUGS] BUG #1075: ecpg rejects C keywords in SQL context

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1075: ecpg rejects C keywords in SQL context in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1075: ecpg rejects C keywords in SQL context - 02-09-2004 , 02:26 PM







The following bug has been logged online:

Bug reference: 1075
Logged by: Bob Showalter

Email address: bob_showalter (AT) taylorwhite (DOT) com

PostgreSQL version: 7.4

Operating system: FreeBSD 4.8

Description: ecpg rejects C keywords in SQL context

Details:

ecpg 3.1.0
PostgreSQL 7.4.1
FreeBSD 4.8 on i386
gcc version 2.95.4 20020320 [FreeBSD]

ecpg seems to erroneously treat C keywords as errors in a SQL context. I
discovered this after upgrading to 7.4 and compiling an existing program
that refers to a column in one of my tables called "auto". The program
compiles successfully on 7.3.

Here's a simple one-line illustration of the problem:

$ echo 'exec sql select auto from foo;' >temp.pgc
$ ecpg temp.pgc
temp.pgc:1: ERROR: syntax error at or near "auto"

I would think that quoting the identifier would allow it to work:

exec sql select "auto" from foo;

but it doesn't seem to make any difference.

If I comment out the call to ScanCKeyword() at line 584 of
src/interfaces/ecpg/preproc/pgc.l, the example above will compile
succesfully.



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Michael Meskes
 
Posts: n/a

Default Re: [BUGS] BUG #1075: ecpg rejects C keywords in SQL context - 02-15-2004 , 09:45 AM






On Mon, Feb 09, 2004 at 03:56:16PM -0400, PostgreSQL Bugs List wrote:
Quote:
that refers to a column in one of my tables called "auto". The program
compiles successfully on 7.3.
I just committed a fix so 'auto' works as it should. Hopefully I've
added all symbols that were missing. So if you find another one please
tell me.

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.