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

From Tom Lane
Subject Re: [HACKERS] FETCH without FROM/IN
Date
Msg-id 28898.947835484@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] FETCH without FROM/IN  (Michael Meskes <meskes@postgreSQL.org>)
List pgsql-hackers
Michael Meskes <meskes@postgreSQL.org> writes:
>> FETCH NEXT;
>> 
>> If both FROM and portal_name were optional, this statement would
>> actually be ambiguous: is it FETCH NEXT from the default portal,

> Do we have a default portal?

Darn if I know, but the current gram.y thinks so.  If I try it
without any preparation, I get:

regression=# fetch;
NOTICE:  PerformPortalFetch: blank portal unsupported
FETCH

but maybe with some magic DECLARE beforehand, it'd work?
Anyone know?

Since the SQL92 spec clearly requires a cursor name to be provided,
I'd be willing to see us remove the option of defaulting the cursor
name.  Is there anyone out there who knows what it does and wants
to argue we should keep it?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Ansley, Michael"
Date:
Subject: RE: Multiple Spindles ( Was: Re: [HACKERS] [hackers]development suggestion needed )
Next
From: Adriaan Joubert
Date:
Subject: Re: [HACKERS] [hackers]development suggestion needed