Re: AS OF queries
От | Tom Lane |
---|---|
Тема | Re: AS OF queries |
Дата | |
Msg-id | 11551.1513783754@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: AS OF queries (Laurenz Albe <laurenz.albe@cybertec.at>) |
Ответы |
Re: AS OF queries
|
Список | pgsql-hackers |
Laurenz Albe <laurenz.albe@cybertec.at> writes: > Konstantin Knizhnik wrote: >> I failed to support AS OF clause (as in Oracle) because of shift-reduce >> conflicts with aliases, >> so I have to introduce new ASOF keyword. May be yacc experts can propose >> how to solve this conflict without introducing new keyword... > I think it would be highly desirable to have AS OF, because that's > the way the SQL standard has it. Please say that's just an Oracle-ism and not SQL standard, because it's formally ambiguous. This is required to work by spec: regression=# select x as of from (values(1)) t(x); of ---- 1 (1 row) so it's not possible for us ever to support an expression that includes top-level "AS OF" (or, pretty much, "AS anything") without some rather enormous pushups. If we absolutely had to do it, the path to a solution would involve some lexer-level lookahead, cf base_yylex() --- but that's messy and tends to introduce its own set of corner case misbehaviors. I'd much rather use a syntax that wasn't chosen with blind disregard for SQL's existing syntactic constraints. regards, tom lane
В списке pgsql-hackers по дате отправления: