From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, David Fetter <david(at)fetter(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Early WIP/PoC for inlining CTEs |
Date: | 2019-01-29 19:52:44 |
Message-ID: | 17787.1548791564@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Mon, Jan 28, 2019 at 05:05:32PM -0500, Tom Lane wrote:
>> Yeah, I thought about that too, but it doesn't seem like an improvement.
>> If the query is very long (which isn't unlikely) I think people would
>> prefer to see the option(s) up front.
> Having these options at the front of the WITH clause looks more
> natural to me.
Well, we've managed to get agreement on the semantics of this thing,
let's not get hung up on the syntax details.
I propose that we implement and document this as
WITH ctename AS [ MATERIALIZE { ON | OFF } ] ( query )
which is maybe a bit clunky but not awful, and it would leave room
to generalize it to "AS [ optionname optionvalue [ , ... ] ]" if we
ever need to. Looking at the precedent of e.g. EXPLAIN, we could
probably allow just "MATERIALIZE" as well, with the boolean value
defaulting to true.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jesper Pedersen | 2019-01-29 20:19:28 | Re: pg_upgrade: Pass -j down to vacuumdb |
Previous Message | Tom Lane | 2019-01-29 19:28:44 | Re: Fixing findDependentObjects()'s dependency on scan order (regressions in DROP diagnostic messages) |