Re: [INTERFACES] esql\c documentation
| От | Michael Meskes |
|---|---|
| Тема | Re: [INTERFACES] esql\c documentation |
| Дата | |
| Msg-id | 19990617104041.A2131@gmx.net обсуждение исходный текст |
| Ответ на | Re: [INTERFACES] esql\c documentation (Craig Orsinger <orsingerc@epg-gw1.lewis.army.mil>) |
| Ответы |
Re: [INTERFACES] esql\c documentation
|
| Список | 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.Meskes@gmx.net | Use PostgreSQL!
В списке pgsql-interfaces по дате отправления: