pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Jeremy Finzel <finzelj@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Early WIP/PoC for inlining CTEs
Date: Tue, 24 Jul 2018 19:57:49 -0400
Message-ID: <21958.1532476669@sss.pgh.pa.us> (raw)
In-Reply-To: <20180724235416.c7c4az6kjxyszkgt@alap3.anarazel.de>
References: <87sh48ffhb.fsf@news-spur.riddles.org.uk>
	<CAMa1XUiQqZmUDYnQCdHejsy35qXC3-YQeVmbBi9qdOW7QYY_nA@mail.gmail.com>
	<20180724231010.quiaae5qyfrreiyj@alap3.anarazel.de>
	<21487.1532476159@sss.pgh.pa.us>
	<20180724235416.c7c4az6kjxyszkgt@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2018-07-24 19:49:19 -0400, Tom Lane wrote:
>> However, a singly-referenced SELECT CTE could reasonably be treated as
>> equivalent to a sub-select-in-FROM, and then you would have the same
>> mechanisms for preventing inlining as you do for those cases,
>> e.g. OFFSET 0.  And sticking in OFFSET 0 would be backwards-compatible
>> too: your code would still work the same in older releases, unlike if
>> we invent new syntax for this.

> I still think this is just doubling down on prior mistakes.

Not following what you think a better alternative is?  I'd be the
first to agree that OFFSET 0 is a hack, but people are used to it.

Assuming that we go for inline-by-default for at least some cases,
there's a separate discussion to be had about whether it's worth
making a planner-control GUC to force the old behavior.  I'm not
very excited about that, but I bet some people will be.

			regards, tom lane




view thread (112+ messages)  latest in thread

Message-ID: <21958.1532476669@sss.pgh.pa.us>
Permalink:  ../21958.1532476669@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21958.1532476669@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, andres@anarazel.de, finzelj@gmail.com, andrew@tao11.riddles.org.uk
  Subject: Re: Early WIP/PoC for inlining CTEs
  In-Reply-To: <21958.1532476669@sss.pgh.pa.us>

* 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