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

From Tom Lane
Subject Re: [HACKERS] CTE inlining
Date
Msg-id 23652.1493923066@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] CTE inlining  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I'm not sure what your point is.  We know that for some cases the
> optimization barrier semantics are useful, which is why the proposal is
> to add a keyword to install one explicitely:

>          with materialized r as
>          (
>             select json_populate_record(null::mytype, myjson) as x
>             from mytable
>          )
>          select (x).*
>          from r;

> this would preserve the current semantics.

Uh, no, it wouldn't, until you had changed your query (and made it
non-SQL-compliant, and unable to work at all on pre-v11 PG).
This might be a good design, but surely it does not provide backwards
compatibility.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Reducing runtime of stats regression test
Next
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] CTE inlining