From: Michael Meskes on 29 Mar 2010 07:34 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(a)jabber.org VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL
|
Pages: 1 Prev: [HACKERS] Using HStore type in TSearch Next: Problems with variable cursorname in ecpg |