BUG #1075: ecpg rejects C keywords in SQL context

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1075: ecpg rejects C keywords in SQL context
Дата
Msg-id 20040209195616.C10ECCF48F7@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1075: ecpg rejects C keywords in SQL context  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1075
Logged by:          Bob Showalter

Email address:      bob_showalter@taylorwhite.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1074: postgresql crashes
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1076: Unicode Errors using Copy command