Hi,

Yesterday I pull source from PG-Devel repository (Head) and was playing
around with ECPG. I got following two issues while parsing my script files
through ECPG preprocessor which I think are potential bugs;


1- I get this error message from preprocessor,

*ERROR: cursor "m_name_cursor" already defined *

Below is the code snippet, error message is thrown on the last line of this
snippet;

...
...
EXEC SQL DECLARE m_name_cursor CURSOR FOR SELECT name,id FROM m_table3;
EXEC SQL OPEN m_name_cursor;
EXEC SQL CLOSE m_name_cursor;

/* Declaring cursor with the same name */
EXEC SQL DECLARE m_name_cursor CURSOR FOR SELECT name,id FROM m_table4;


2- Preprocessor throws this error;

*ERROR: syntax error at or near "-"*

Below is the code snippet, the error is thrown on the last line of the
snippet;

...
...
const char *stmt1 = "SELECT abs(?)";
EXEC SQL PREPARE mystmt1 FROM :stmt1;
EXEC SQL EXECUTE mystmt1 INTO :result USING -.55566;



Regards,
Ahmed

Reply via email to