Re: AS OF queries - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: AS OF queries
Date
Msg-id CAMsr+YEQugU_X+nEmZVtcvFOEXx5G=ti6SdYRw3krbiSN+Zapw@mail.gmail.com
Whole thread Raw
In response to Re: AS OF queries  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 21 December 2017 at 00:17, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
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.  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.

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.

Well, the SQL committe seem to specialise in parser torture.

Window functions, anybody?

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0