Re: [HACKERS] FETCH without FROM/IN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgreSQL(dot)org>
Cc: PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] FETCH without FROM/IN
Date: 2000-01-13 01:13:02
Message-ID: 11241.947725982@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes <meskes(at)postgreSQL(dot)org> writes:
> <fetch statement> ::=
> FETCH [ [ <fetch orientation> ] FROM ]
> <cursor name> INTO <fetch target list>

> To me this seems to say that FROM is just optional. Okay, if I make it
> optional in our parser?

Careful --- notice that FROM is only optional if you *also* omit all the
preceding optional clauses. Otherwise there will be a reduce conflict
that you could only resolve by removing all of FETCH's secondary
keywords from the ColId list. I don't think that would be an acceptable
tradeoff.

I think, though, that you could make our syntax work like
FETCH [ opt_direction fetch_how_many FROM/IN ] portal_name
without conflicts. That'd be good since it'd be more like SQL92.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2000-01-13 01:16:15 RE: [HACKERS] TODO list updated
Previous Message Bruce Momjian 2000-01-13 01:12:54 Re: [HACKERS] TODO list updated