Re: ECPG Preprocessor throws Syntax Error [Devel Repository]

Поиск
Список
Период
Сортировка
От Zahid Khan
Тема Re: ECPG Preprocessor throws Syntax Error [Devel Repository]
Дата
Msg-id 216424.58053.qm@web54502.mail.re2.yahoo.com
обсуждение исходный текст
Ответ на Re: ECPG Preprocessor throws Syntax Error [Devel Repository]  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: ECPG Preprocessor throws Syntax Error [Devel Repository]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
>I might be missing something here, but where do you see the bug? The cursor is
>indeed already defined.

What i understand here is,we should be able to DECLARE cursor again
with the same name if that is CLOSE already.


--- On Fri, 12/12/08, Michael Meskes <meskes@postgresql.org> wrote:
From: Michael Meskes <meskes@postgresql.org>
Subject: Re: [BUGS] ECPG Preprocessor throws Syntax Error [Devel Repository]
To: "Ahmed Shinwari" <ahmed.shibwari@gmail.com>
Cc: pgsql-bugs@postgresql.org
Date: Friday, December 12, 2008, 4:26 AM

On Thu, Dec 11, 2008 at 10:09:40PM +0500, Ahmed Shinwari wrote:
> 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;

I might be missing something here, but where do you see the bug? The cursor is
indeed already defined.

> 2- Preprocessor throws this error;
>
> *ERROR: syntax error at or near "-"*
> ...

Fixed in CVS. Thanks for the report.

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: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4578: Not releaseing memory from PQmakeEmptyPGresult when calling PQisBusy
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ECPG Preprocessor throws Syntax Error [Devel Repository]