Re: [HACKERS] FETCH without FROM/IN

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] FETCH without FROM/IN
Дата
Msg-id 11241.947725982@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] FETCH without FROM/IN  (Michael Meskes <meskes@postgreSQL.org>)
Ответы Re: [HACKERS] FETCH without FROM/IN  (Michael Meskes <meskes@postgreSQL.org>)
Список pgsql-hackers
Michael Meskes <meskes@postgreSQL.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 likeFETCH [ 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] TODO list updated
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] TODO list updated