Re: ecpg weird behavior

From: "Nicolas Bazin" <nbazin(at)ingenico(dot)com(dot)au>
To: "Thomas Lockhart" <thomas(at)fourpalms(dot)org>, "Michael Meskes" <meskes(at)postgresql(dot)org>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: ecpg weird behavior
Date: 2002-03-17 23:41:41
Message-ID: 008c01c1ce0d$4a34b730$660d090a@software.ingenico.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces


----- Original Message -----
From: "Thomas Lockhart" <thomas(at)fourpalms(dot)org>
To: "Michael Meskes" <meskes(at)postgresql(dot)org>
Cc: "Nicolas Bazin" <nbazin(at)ingenico(dot)com(dot)au>;
<pgsql-interfaces(at)postgresql(dot)org>
Sent: Saturday, March 16, 2002 4:11 AM
Subject: Re: [INTERFACES] ecpg weird behavior

> ...
> > > EXEC SQL FETCH curs_currency;
> > Anyone out there with more knowledge about standards? I thought this was
> > not standard at all.
>
> From what I can tell from my SQL99 maybe-docs we have all shared in the
> past on this list, the INTO is required to travel with the FETCH
> statement:
>
> <dynamic fetch statement> ::=
> FETCH [ [ <fetch orientation> ] FROM ] <dynamic cursor
> name>
> <output using clause>
>
> <output using clause> ::=
> <into arguments>
> | <into descriptor>
>
> <into arguments> ::=
> INTO <into argument> [ { <comma> <into argument> }... ]
>
> <into argument> ::= <target specification>
>
> <into descriptor> ::=
> INTO [ SQL ] DESCRIPTOR <descriptor name>
>
> hth
>
> - Thomas
>
> btw, I was working for the first time with ecpg and was very impressed.
> A company porting from Oracle ran into very few issues. Their existing
> code *did* have an Oracle extension to use a cursor to select multiple
> rows into variables declared as arrays. Have you run into this syntax or
> thought about what it would take to implement it?
>
Yes I also have this issue. From what I read in the ecpg doc, indexed
variables are not supported by ecpg and trying to compile the code definitle
proved it is not supported. The way I work arround it is to declare a local
variable of the same type, copy the array element into this variable,
perform the FECTH or SELECT and then copy the variable back into the array
element. I guess the preprocessor could also generate the code.
Another issue I had that ecpg does not support prepared statements. But I
didn't have that many prepared statements so I just rewrote the code.

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Nicolas Bazin 2002-03-18 04:34:56 Re: ecpg weird behavior
Previous Message Jeroen T. Vermeulen 2002-03-17 00:27:27 libpqxx milestone