Re: ecpg weird behavior - Mailing list pgsql-interfaces

From Thomas Lockhart
Subject Re: ecpg weird behavior
Date
Msg-id 3C922B46.BA9F85D@fourpalms.org
Whole thread Raw
In response to ecpg weird behavior  ("Nicolas Bazin" <nbazin@ingenico.com.au>)
List pgsql-interfaces
...
> > 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?


pgsql-interfaces by date:

Previous
From: Miguel Omar Carvajal
Date:
Subject: Duplicate key
Next
From: Andreas Kretzer
Date:
Subject: Re: Problem with pgaccess