From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu> |
Cc: | Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: embedded SQL cursos declare fails |
Date: | 2001-07-11 03:37:15 |
Message-ID: | 200107110337.f6B3bFJ02855@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 just my misunderstanding, someone rephrase thin in the docs.
>
>
> cheers,
> thalis
>
> >
> > Michael
> > --
> > Michael Meskes
> > Michael(at)Fam-Meskes(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-07-11 03:43:52 | Re: Embedded sql PREPARE statement |
Previous Message | Justin Clift | 2001-07-11 03:32:10 | Re: Performance tuning for linux, 1GB RAM, dual CPU? |