Re: Early WIP/PoC for inlining CTEs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Early WIP/PoC for inlining CTEs
Date
Msg-id 12408.1548707732@sss.pgh.pa.us
Whole thread Raw
In response to Re: Early WIP/PoC for inlining CTEs  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Early WIP/PoC for inlining CTEs  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> However, generally we have not had great luck with just sticking
> keywords in there (cf. VACUUM, ANALYZE, EXPLAIN, COPY) which is why I
> suggested using a flexible syntax with parenthesized options.

Fair, except that as you then proceed to point out, that does not work
either before or after the AS.

Conceivably we could make it work without the parens:

    WITH ctename AS [ option = value [ , .... ] ] ( query .... )

which for the immediate feature I'd be tempted to spell as

    WITH ctename AS [ materialize = on/off ] ( query ... )

I think the only reason the syntax is MATERIALIZED with a D is that
that's already a keyword; it reads a bit awkwardly IMO.  But if we
were accepting a ColId there, there'd be room to adjust the spelling.

That said, this is still clunkier than the existing proposal, and
I'm not really convinced that we need to leave room for more options.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Proposed refactoring of planner header files
Next
From: "Nishant, Fnu"
Date:
Subject: Re: possible deadlock: different lock ordering for heap pages