ECPG Preprocessor throws Syntax Error [Devel Repository] - Mailing list pgsql-bugs

From Ahmed Shinwari
Subject ECPG Preprocessor throws Syntax Error [Devel Repository]
Date
Msg-id e31749290812110909k652328d3n81b9149ee2bbec75@mail.gmail.com
Whole thread Raw
Responses Re: ECPG Preprocessor throws Syntax Error [Devel Repository]  (Michael Meskes <meskes@postgresql.org>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Scott Carey
Date:
Subject: Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)
Next
From: Tom Lane
Date:
Subject: Re: BUG #4575: All page cache in shared_buffers pinned (duplicated by OS, always)