ECPG and Curors.

From: "Peter L(dot) Berghold" <Peter(at)berghold(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: ECPG and Curors.
Date: 2006-06-13 03:14:24
Message-ID: 448E2D90.9000800@Berghold.Net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm looking at the documentation for Postgresql in Chapter 30 and I'm
checking out how to use FETCH INTO and CURSORs to loop through multiple
results from a table.

In the documentation they show something like

EXEC SQL DECLARE foo CURSOR for select a,b,c from test_table

do {
EXEC SQL FETCH NEXT FROM foo INTO ....

} while ( ... );

what I don't see is how to detect that I've fetched the last row from a
query. Is there more complete doco on this process somewhere?

- --
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Peter L. Berghold Peter(at)Berghold(dot)Net
"Those who fail to learn from history are condemned to repeat it."
AIM: redcowdawg Yahoo IM: blue_cowdawg ICQ: 11455958
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org

iD8DBQFEji2QUM9/01RIhaARAqV6AJ43/F6y5sKbvY837dVwNL8ZPz0MxgCeIJlL
5Fo3FyR3e5Aup53s/z0UrxY=
=RLxy
-----END PGP SIGNATURE-----

Attachment Content-Type Size
Peter.vcf text/x-vcard 239 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Tregea 2006-06-13 03:26:29 Re: Help with storing spatial (map coordinates) data?
Previous Message Brent Wood 2006-06-13 03:14:15 Re: Help with storing spatial (map coordinates) data?