BUG #1165: ECPG can't parse dynamic SQL with indicator

From: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1165: ECPG can't parse dynamic SQL with indicator
Date: 2004-06-15 00:52:20
Message-ID: 20040615005220.721A4CF48A5@www.postgresql.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1165
Logged by: ISHIDA Akio

Email address: iakio(at)mono-space(dot)net

PostgreSQL version: 7.4

Operating system: Linux miracle 2.4.9-31.22ml

Description: ECPG can't parse dynamic SQL with indicator

Details:

$ cat indtest.pgc
int main()
{
exec sql begin declare section;
int i, i_ind;
exec sql end declare section;
exec sql execute stmt using :i; /* good */
exec sql execute stmt using :i :i_ind; /* error */
}

==== version 7.3.6 ====
$ pgsql736/bin/ecpg --version
ecpg (PostgreSQL 7.3.6) 2.10.0
$ pgsql736/bin/ecpg indtest.pgc
(No error)

==== version 7.4.2 ====
$ pgsql742/bin/ecpg --version
ecpg (PostgreSQL 7.4.2) 3.1.1
$ pgsql742/bin/ecpg indtest.pgc
indtest.pgc:7: ERROR: syntax error at or near ":i_ind"

This problem was reported in Japanese mailing list.
http://ml.postgresql.jp/pipermail/pgsql-jp/2004-June/008332.html

It is a patch.(but I'm not good at using bison)

--- src/interfaces/ecpg/preproc/preproc.y.org Mon Jun 14 11:24:25 2004
+++ src/interfaces/ecpg/preproc/preproc.y Fri Jun 11 12:54:10 2004
@@ -5304,6 +5304,7 @@
add_variable_to_head(&argsinsert,
new_variable($1, ECPGmake_simple_type(ECPGt_const, length), 0),
&no_indicator);
}
}
+ | civarind { $$ = EMPTY; }
;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PostgreSQL Bugs List 2004-06-15 10:56:06 BUG #1166: pg_relcheck don't exist
Previous Message Bruce Momjian 2004-06-15 00:51:02 Re: PostgreSQL does not have native spinlock support on this