Re: embedded SQL cursos declare fails

Поиск
Список
Период
Сортировка
От Thalis A. Kalfigopoulos
Тема Re: embedded SQL cursos declare fails
Дата
Msg-id Pine.LNX.4.21.0106191200140.24987-100000@aluminum.cs.pitt.edu
обсуждение исходный текст
Ответ на Re: embedded SQL cursos declare fails  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: embedded SQL cursos declare fails  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: embedded SQL cursos declare fails  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
On Tue, 19 Jun 2001, Michael Meskes wrote:

> On Mon, Jun 18, 2001 at 03:59:56PM -0400, Thalis A. Kalfigopoulos wrote:
> > EXEC SQL DECLARE my_cursor CURSOR FOR SELECT a,b FROM lala WHERE a= :i;
> > EXEC SQL FETCH FORWARD NEXT FROM my_cursor INTO :tmpa,:tmpb;
>
> Is there an EXEC SQL OPEN CURSOR my_cursor in between these lines?
>
> > I check the .c file generated by ecpg and the cursor declaration is commented out :-(
>
> That's correct. It's placed at the OPEN spot.

Correct, it works. But I was confused because the documentation
(http://www.postgresql.org/idocs/index.php?ecpg-develop.html)mentions: 

Open cursor statement
     An open cursor statement looks like:
     exec sql open cursor;
     and is ignore and not copied from the output.

This gave me the impression that no explicit OPEN is necessary to operate on the cursor (normal Pg behavior). If not
justmy misunderstanding, someone rephrase thin in the docs. 


cheers,
thalis

>
> Michael
> --
> Michael Meskes
> Michael@Fam-Meskes.De
> Go SF 49ers! Go Rhein Fire!
> Use Debian GNU/Linux! Use PostgreSQL!
>


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

Предыдущее
От: Vivek Khera
Дата:
Сообщение: Re: MySQL Question
Следующее
От: "Thalis A. Kalfigopoulos"
Дата:
Сообщение: Embedded sql PREPARE statement