This is expected behaviour, the 'real' code gets emitted when you OPEN
the cursor, i.e. you should be doing something like:
EXEC SQL DECLARE demo_cur CURSOR FOR
SELECT field1, field2
FROM test;
EXEC SQL OPEN demo_cur;
if( sqlca.sqlcode != 0 )
{
some_error();
return;
}
while( 1 )
Hello,
I have downloaded postgresql 7.2 on my machine.
Running ecpg on my .ec-file I found that ecpg did not process
the statements "exec sql declare xxx cursor for select.
The part in my .ec-file:
if ( firstcall )
{
calid1 = calid;
EXEC SQL DECLARE CURMFDPOINT CURSOR FOR SELECT STABLE