Michael Meskes írta:
> On Sat, Aug 08, 2009 at 04:57:57PM -0400, Tom Lane wrote:
>   
>> The fundamental reason that there's a problem here is that ecpg has
>> decided to accept a syntax that the backend doesn't (ie, FETCH with a
>> fetch direction but no FROM/IN).  I think that that's basically a bad
>>     
>
> Which was added because most if not all other precompilers allow this syntax
> and of course it didn't do any harm until now.
>   

:-( Why me? ;-)

>> idea: it's not helpful to users to be inconsistent, and it requires ugly
>> hacks in ecpg, and now ugly hacks in the core grammar as well.  We
>> should resolve it either by taking out that syntax from ecpg, or by
>> making the backend accept it too.  Not by uglifying the grammars some
>> more in order to keep them inconsistent.
>>     
>
> Couldn't agree more.
>
> I'd like to figure out exactly what syntax other DBMSes accept. It appears
> Informix allows the cursor name as a variable but has neither FORWARD/BACKWARD
> nor FROM/IN. Zoltan, could you please check whether my docs are right? 
>   

Yes, your docs seems to be right. From my docs, Informix allows these:

FETCH
    { [NEXT] | PRIOR | PREVIOUS | FIRST | LAST | CURRENT |
        ABSOLUTE pos_var_or_const |
        RELATIVE { [+]pos_var_or_const | -pos_const }
    }
    { cursor_id | cursor_var }
    { USING [SQL] DESCRIPTOR ... | INTO host_var_list... }

There's no FROM or IN anywhere in the syntax snake maze graph.

> A quick google search seems to suggest that the same holds for Oracle that
> apparently allows less options.
>
> Michael
>   

Best regards,
Zoltán Böszörményi

-- 
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to