Re: AS OF queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AS OF queries
Дата
Msg-id 15331.1513787181@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: AS OF queries  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: AS OF queries  (Pantelis Theodosiou <ypercube@gmail.com>)
Re: AS OF queries  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 12/20/17 10:29, Tom Lane wrote:
>> Please say that's just an Oracle-ism and not SQL standard, because it's
>> formally ambiguous.

> The SQL standard syntax appears to be something like

> "tablename" [ AS OF SYSTEM TIME 'something' ] [ [ AS ] "alias" ]

> That's not going to be fun to parse.

Bleah.  In principle we could look two tokens ahead so as to recognize
"AS OF SYSTEM", but base_yylex is already a horrid mess with one-token
lookahead; I don't much want to try to extend it to that.

Possibly the most workable compromise is to use lookahead to convert
"AS OF" to "AS_LA OF", and then we could either just break using OF
as an alias, or add an extra production that allows "AS_LA OF" to
be treated as "AS alias" if it's not followed by the appropriate
stuff.

It's a shame that the SQL committee appears to be so ignorant of
standard parsing technology.

            regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] replace GrantObjectType with ObjectType
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: AS OF queries