Problems with variable cursorname in ecpg

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Problems with variable cursorname in ecpg
Дата
Msg-id 20100329113435.GA3430@feivel.credativ.lan
обсуждение исходный текст
Ответы Re: Problems with variable cursorname in ecpg  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-hackers
Hi,

I did some more testing on ecpg and found that allowing variables as cursor
names seems to produce more problems than I anticipated. But then maybe it's
just some missing checks to throw out error messages. Anyway, I attach a small
test program that, from my understanding, should work, but dosn't. Could
somebody with access to embedded SQL precompilers from other DBMSes please try
if this test case works with them?

The problem we seem to have right now comes from the original logic in ecpg
moving the declare cursor statement to the position of the open cursor
statemend at compile time. With the cursor name being unique this never has
been a problem. However, with variables as cursor names, this uniqueness need
not hold anymore. If it does, i.e. each cursor gets its own variable, all is
well, but if not, it doesn't work correctly at all times.

BTW I can modify the test case so it works fine, but ecpg will still throw an
error message, which is not a good situation either.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ 179140304, AIM/Yahoo/Skype michaelmeskes, Jabber meskes@jabber.org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL

Вложения

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

Предыдущее
От: Łukasz Dejneka
Дата:
Сообщение: Using HStore type in TSearch
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Proposal: Add JSON support