Re: [HACKERS] FETCH without FROM/IN - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] FETCH without FROM/IN
Date
Msg-id 387CAF1B.A4F9466B@alumni.caltech.edu
Whole thread Raw
In response to FETCH without FROM/IN  (Michael Meskes <meskes@postgresql.org>)
Responses Re: [HACKERS] FETCH without FROM/IN
List pgsql-hackers
> Looking at the SQL92 spec, it seems we are mighty far away from any
> defensible reading of the spec :-(...
> Are we compatible with anything at all???

Although not rigorously compatible, it appears that we do allow
compatible syntax:

FETCH 4 FROM t1;
FETCH NEXT FROM t1;

But afaik our cursor behavior does not currently allow supporting

FETCH FIRST FROM t1; -- cursor can't be positioned to first/last
FETCH ABSOLUTE 4 FROM t1; -- not sure about this one...
FETCH RELATIVE 4 FROM t1; -- this could be a MOVE/FETCH combination?

so we, uh, don't support it (yet). 

I'd suggest definitely supporting all SQL92 syntax that the cursor can
manage, and also supporting the existing Postgres behaviors (which may
only be a simple subset). If we have just *alternate* syntax for the
same thing, then v7.0 would be a good time to straighten it up.
                    - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Re: [SQL] createdb -D xxxx not working
Next
From: Cory Kempf
Date:
Subject: Re: postgresql installation