Re: embedded SQL cursos declare fails
От | Bruce Momjian |
---|---|
Тема | Re: embedded SQL cursos declare fails |
Дата | |
Msg-id | 200107110337.f6B3bFJ02855@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: embedded SQL cursos declare fails ("Thalis A. Kalfigopoulos" <thalis@cs.pitt.edu>) |
Список | pgsql-general |
Can someone comment on this? I can't tell from the grammar. > 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! > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: