Skip site navigation (1) Skip section navigation (2)

fetch syntax - ecpg problems

From: lyman1(at)mindspring(dot)com
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: fetch syntax - ecpg problems
Date: 1998-12-09 19:47:42
Message-ID: 003901be23ac$c9d55120$55fb45cf@user (view raw or flat)
Thread:
Lists: pgsql-interfaces
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.

pgsql-interfaces by date

Next:From: Michael YeungDate: 1998-12-10 00:32:19
Subject: Lock the server
Previous:From: Constantin TeodorescuDate: 1998-12-09 19:31:21
Subject: PgAccess is working 95% under Ms Windows !

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group