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

ECPG FETCH [number|ALL] IN cursor_name... with host variable

From: coyotitos_house(at)juno(dot)com
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ECPG FETCH [number|ALL] IN cursor_name... with host variable
Date: 1999-11-21 05:25:11
Message-ID: 19991121.002513.-4143103.0.Coyotitos_house@juno.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
The ECPG FETCH statement is very different from Pro*C & ESQL/C. It's hard
to know how to make normal features work.

I'm trying to tell FETCH to load host arrays with a run-time determined
number of rows:

int count = 10;
int age[10];
char name[10][30];

EXEC SQL FETCH :count IN the_cursor INTO :age, :name;

FETCH statements WILL allow a constant number in place of ":count". So,
replacing ":count" with "10" fetches the first ten rows from the cursor.
The keyword "ALL" also works. So, the backend functionality is there.

I'm using the RPM files for Postgres 6.5.3 and ECPG 2.6.0. I don't think
I have the source code.

Can anyone tell me whether I can just modify the parser to make this
feature possible? I understand yacc, and this can't be hard.

pgsql-interfaces by date

Next:From: Douglas ThomsonDate: 1999-11-21 06:14:42
Subject: Re: [INTERFACES] Front end memory consumption in SELECT
Previous:From: Tom LaneDate: 1999-11-21 04:22:42
Subject: Re: [INTERFACES] pg_pwd

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