From: David Fetter <david@fetter.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Early WIP/PoC for inlining CTEs
Date: Fri, 16 Nov 2018 23:41:07 +0100
Message-ID: <20181116224107.GB958@fetter.org> (raw)
In-Reply-To: <8810.1542402910@sss.pgh.pa.us>
References: <87sh48ffhb.fsf@news-spur.riddles.org.uk>
<20180725054236.GB17411@fetter.org>
<87bmavfjhy.fsf@news-spur.riddles.org.uk>
<20180725191447.GE17411@fetter.org>
<CAEepm=0MKV3MnR4Dn5RkXsK+RnmHEFitqiG4PcBhXtBK4JOoWw@mail.gmail.com>
<20180727081058.GN17411@fetter.org>
<dccb37dd-2f52-dbd7-a4c4-72a5853f4838@proxel.se>
<e02af96a-3e25-5de4-09a4-a7ebf3452184@proxel.se>
<8810.1542402910@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: david@fetter.org, tgl@sss.pgh.pa.us, andreas@proxel.se, thomas.munro@enterprisedb.com, andrew@tao11.riddles.org.uk
Subject: Re: Early WIP/PoC for inlining CTEs
In-Reply-To: <20181116224107.GB958@fetter.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox