Received: from smtp2.mindspring.com (smtp2.mindspring.com [207.69.200.32]) by hub.org (8.9.1/8.9.1) with ESMTP id OAA09612 for ; Wed, 9 Dec 1998 14:54:26 -0500 (EST) (envelope-from lyman1@mindspring.com) From: lyman1@mindspring.com Received: from user (user-37kbuql.dialup.mindspring.com [207.69.251.85]) by smtp2.mindspring.com (8.8.5/8.8.5) with SMTP id OAA02134 for ; Wed, 9 Dec 1998 14:54:25 -0500 (EST) Message-ID: <003901be23ac$c9d55120$55fb45cf@user> To: Subject: fetch syntax - ecpg problems Date: Wed, 9 Dec 1998 14:47:42 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0036_01BE2382.E02CB6E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.0 This is a multi-part message in MIME format. ------=_NextPart_000_0036_01BE2382.E02CB6E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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.=20 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. =20 Thanks for any help, and I extend my gratitude and appreciation to the = linux/shareware community. ------=_NextPart_000_0036_01BE2382.E02CB6E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I am an old school developer(I worked on the X3H2 = committee on=20 the sql2 spec)checking out postgresql and trying to get it to work via=20 "C" and the preprocessor "ecpg" that came with it on = the=20 REDHAT LINUX 5.1 CD. I have gotten all the basic functions to precompile = and run=20 except Fetches.
Can someone please send me a simple working test = program=20 listing ( not pseudo code) that includes a cursor declaration and a = fetch that=20 will work with multi-row result sets (a "c"/"sql" = program=20 that can be preprocessed with ecpg and compiled/linked).  When I = imitate=20 the "exec sql fetch all in cursorname" format from the Fetch = man page=20 I get a parse error from ecpg on the fetch line. 
 Also, the man page declares "declare = mycursor=20 cursor for ..." but then the fetch statement  on the same man = page=20 refers to "fetch all in FOO".  Is=20 "FOO" just a loose reference to the cursorname, or am I = missing=20 something.  If it is, it should say "fetch all in = mycursor" to=20 enable a clear example. 
  Thanks for any help, and I extend my = gratitude and=20 appreciation to the linux/shareware = community.
------=_NextPart_000_0036_01BE2382.E02CB6E0--