Received: from mout0.01019freenet.de (exim@mout0.01019freenet.de [62.104.201.5]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA30426 for ; Thu, 17 Jun 1999 04:40:19 -0400 (EDT) (envelope-from Michael.Meskes@gmx.net) Received: from [62.104.201.2] (helo=mx1.01019freenet.de) by mout0.01019freenet.de with esmtp (Exim 3.02 #5) id 10uXib-0008J7-00 for pgsql-interfaces@postgresql.org; Thu, 17 Jun 1999 10:40:17 +0200 Received: from [212.81.152.61] (helo=tanja.fam-meskes.de) by mx1.01019freenet.de with esmtp (Exim 3.02 #5) id 10uXhS-00043t-01 for pgsql-interfaces@postgreSQL.org; Thu, 17 Jun 1999 10:39:11 +0200 Received: (from meskes@localhost) by tanja.fam-meskes.de (8.9.3/8.9.3/Debian/GNU) id KAA02169 for pgsql-interfaces@postgreSQL.org; Thu, 17 Jun 1999 10:40:41 +0200 Date: Thu, 17 Jun 1999 10:40:41 +0200 From: Michael Meskes To: pgsql-interfaces@postgresql.org Subject: Re: [INTERFACES] esql\c documentation Message-ID: <19990617104041.A2131@gmx.net> Mail-Followup-To: pgsql-interfaces@postgreSQL.org References: <19990616203638.A1114@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: ; from Craig Orsinger on Wed, Jun 16, 1999 at 02:33:06PM -0700 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 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 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!