Re: Early WIP/PoC for inlining CTEs
David Fetter <david@fetter.org>
From: David Fetter <david@fetter.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andreas Karlsson <andreas@proxel.se>, Thomas Munro <thomas.munro@enterprisedb.com>, Andrew Gierth <andrew@tao11.riddles.org.uk>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-11-16T22:41:07Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Prevent inlining of multiply-referenced CTEs with outer recursive refs.
- 9476131278c7 12.0 landed
-
Allow user control of CTE materialization, and change the default behavior.
- 608b167f9f9c 12.0 landed
-
Split QTW_EXAMINE_RTES flag into QTW_EXAMINE_RTES_BEFORE/_AFTER.
- 18c0da88a5d9 12.0 landed
-
document when PREPARE uses generic plans
- fab9d1da4a21 9.6.0 cited
On Fri, Nov 16, 2018 at 04:15:10PM -0500, Tom Lane wrote: > Andreas Karlsson <andreas@proxel.se> writes: > > [ inlining-ctes-v5.patch ] > > I took a little bit of a look through this. Some thoughts: > > * I think it'd be a good idea if we made OFFSET/LIMIT in a CTE be an > alternate way of keeping it from being inlined. As the patch stands, > if that's the behavior you want, you have no way to express it in > a query that will also work in older servers. (I will manfully > resist suggesting that then we don't need the nonstandard syntax > at all ... oops, too late.) If we're on board with exposing pilot error, we could decide not to implement the nonstandard WITH syntax. One type of pilot error this would expose is a situation where: - A UDF has side effects, but is declared IMMUTABLE - A WITH clause calls it in order to get those side effects on the entire result set Best, David. -- David Fetter <david(at)fetter(dot)org> http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate