From: | Michael Meskes <meskes(at)postgresql(dot)org> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] esql\c documentation |
Date: | 1999-06-17 08:40:41 |
Message-ID: | 19990617104041.A2131@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Wed, Jun 16, 1999 at 02:33:06PM -0700, Craig Orsinger wrote:
> cursors rather differently from the way PostgreSQL does. There are three
> different types defined: non-scroll, SCROLL (SELECT), and FOR UPDATE. The
> FETCH statement has no IN/OUT clause, since ESQL/C seems to be able to
> remember what type of cursor each one is. What makes this a porting
> challenge is that the ESQL/C parser will not accept and IN/OUT clause if
> it is there. SCROLL cursors, OTOH, have a position clause, which
> ...
What do you mean with IN/OUT? Please try your syntax directly via psql to
see whether this is an ECPG problem. DECLARE/FETCH commands are handled by
the backend.
> I've found that replacing the FREE <cursor id> with a COMMIT
> statement works pretty well for me, since Informix offers the ability
> to not use transactions - a feature my applications don't require.
You can do the same with postgresql, i.e. each statement is its own
transaction.
> track of the fact that you've already declared it (using a flag,
> presumably). How well would that work in ECPG? [BTW, ESQL/C does flag
> the FREE <cursor id> statement as being non-compliant with ANSI SQL.]
I think we only have FREE for prepared statements not for cursors. I cnnot
remember reading anything about freeing cursor in SQL92.
> EXEC SQL BEGIN DECLARE SECTION ;
> char field_a[FIELD_A_LEN+1] ;
> EXEC SQL END DECLARE SECTION ;
Should work. You have to EXEC SQL DEFINE FIELD_A_LEN 1 before.
Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(dot)Meskes(at)gmx(dot)net | Use PostgreSQL!
From | Date | Subject | |
---|---|---|---|
Next Message | StOo | 1999-06-17 10:02:14 | psql command access through libpq/libpq++ |
Previous Message | Gene Sokolov | 1999-06-17 07:51:13 | Re: [HACKERS] Case tool |