Re: [HACKERS] CTE inlining - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] CTE inlining
Date
Msg-id CAMsr+YEkOjHEsGbHAPy0ki0WSD1-KkQEiq8LO_EJFcoyodMTqA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] CTE inlining  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
On 1 May 2017 at 21:22, Andrew Dunstan <andrew.dunstan@2ndquadrant.com> wrote:

> Having had years of telling users that CTEs are an optimization fence it
> doesn't seem at all nice for us to turn around and change our mind about
> that. I have relied on it in the past and I'm sure I'm very far from
> alone in that.
>
> Maybe we could allow a "decorator" that would tell the planner the CTE
> could be inlined?
>
>     WITH INLINE mycte AS ( ...)

I'd rather reverse that so we behave like other implementations by
default, and have extension syntax for our no-inline query hint. And
yes, that's what it is, because we'd only inline when we could produce
semantically equivalent results anyway.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: [HACKERS] check with serial
Next
From: Neha Khatri
Date:
Subject: [HACKERS] Description of create_singleton_array()