From: Michael Meskes <meskes@postgresql.org>
To: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] esql\c documentation
Date: Thu, 17 Jun 1999 10:40:41 +0200
Message-ID: <19990617104041.A2131@gmx.net> (raw)
In-Reply-To: <XFMail.990616143306.orsingerc@epg-gw1.lewis.army.mil>
References: <19990616203638.A1114@gmx.net>
<XFMail.990616143306.orsingerc@epg-gw1.lewis.army.mil>
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.Meskes@gmx.net | Use PostgreSQL!
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: meskes@postgresql.org
Subject: Re: [INTERFACES] esql\c documentation
In-Reply-To: <19990617104041.A2131@gmx.net>
* 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