Re: Consequence of changes to CTE's in 12

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Lewis <mlewis(at)entrata(dot)com>
Cc: Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Consequence of changes to CTE's in 12
Date: 2021-02-12 00:35:58
Message-ID: 1510830.1613090158@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Lewis <mlewis(at)entrata(dot)com> writes:
> If you move the limit 1 to the first CTE, does it not give you the same
> behavior in both versions?

Not sure if that's exactly the same, but certainly adding a traditional
optimization fence (OFFSET 0) to the first CTE should do the trick.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Baldwin 2021-02-12 00:36:52 Re: Consequence of changes to CTE's in 12
Previous Message David G. Johnston 2021-02-12 00:23:46 Re: Consequence of changes to CTE's in 12