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