From: lyman1@mindspring.com
To: pgsql-sql@postgresql.org
Date: Wed, 9 Dec 1998 14:46:54 -0500
Message-ID: <003101be23ac$ad26c9a0$55fb45cf@user> (raw)
I am an old school developer(I worked on the X3H2 committee on the sql2 spec)checking out postgresql and trying to get it to work via "C" and the preprocessor "ecpg" that came with it on the REDHAT LINUX 5.1 CD. I have gotten all the basic functions to precompile and run except Fetches.
Can someone please send me a simple working test program listing ( not pseudo code) that includes a cursor declaration and a fetch that will work with multi-row result sets (a "c"/"sql" program that can be preprocessed with ecpg and compiled/linked). When I imitate the "exec sql fetch all in cursorname" format from the Fetch man page I get a parse error from ecpg on the fetch line.
Also, the man page declares "declare mycursor cursor for ..." but then the fetch statement on the same man page refers to "fetch all in FOO". Is "FOO" just a loose reference to the cursorname, or am I missing something. If it is, it should say "fetch all in mycursor" to enable a clear example.
Thanks for any help, and I extend my gratitude and appreciation to the linux/shareware community.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: lyman1@mindspring.com
Subject: Re:
In-Reply-To: <003101be23ac$ad26c9a0$55fb45cf@user>
References: <003101be23ac$ad26c9a0$55fb45cf@user>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox