Re: Is this a bug in ECPG?

Поиск
Список
Период
Сортировка
От Boszormenyi Zoltan
Тема Re: Is this a bug in ECPG?
Дата
Msg-id 52298AEE.808@cybertec.at
обсуждение исходный текст
Ответ на Is this a bug in ECPG?  ("Wang, Jing" <jingw@fast.au.fujitsu.com>)
Ответы Re: Is this a bug in ECPG?  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-general
2013-09-06 02:57 keltezéssel, Wang, Jing írta:

Hi,

 

ECPG don’t support the following scenario:

 

char cur_name = “cur1”;

EXEC SQL DECLARE :cur_name CURSOR FOR …

EXEC SQL OPEN :cur_name;

EXEC SQL FETCH cur1 INTO…

EXEC SQL CLOSE :cur_name;

 

An compile error will occur for above codes because ECPG can’t find the “cur1”.


Of course it cannot find it, ECPG doesn't interpret the content of the variable,
so it cannot know it is "cur1".

 

 

But it does support the following scenario:

 

char cur_name = “cur1”;

EXEC SQL DECLARE :cur_name CURSOR FOR …

EXEC SQL OPEN :cur_name;

EXEC SQL FETCH :cur_name INTO…

EXEC SQL CLOSE cur1;

 

 

Does the second scenario is a bug for ECPG?


Actually, it looks like it is a bug.

 Will anyone use the second scenario to close an CURSOR that is named by a variable?


Not very likely.

 

Kind regards,

Jing

 



-- 
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de    http://www.postgresql.at/

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

Предыдущее
От: Szymon Guz
Дата:
Сообщение: Re: Levenshtein Distance with more than 255 characters
Следующее
От: Szymon Guz
Дата:
Сообщение: Failed to autoconvert '1' to text.