Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pK6Nv-0002FR-Db for pgsql-committers@arkaria.postgresql.org; Mon, 23 Jan 2023 23:37:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pK6Nu-0004JW-AJ for pgsql-committers@arkaria.postgresql.org; Mon, 23 Jan 2023 23:37:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pK6Nu-0004AX-2v for pgsql-committers@lists.postgresql.org; Mon, 23 Jan 2023 23:37:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pK6Nl-0007TV-1U; Mon, 23 Jan 2023 23:37:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30NNbfbc2144819; Mon, 23 Jan 2023 18:37:41 -0500 From: Tom Lane To: David Rowley cc: pgsql-committers@lists.postgresql.org, Richard Guo Subject: Re: pgsql: Fix LATERAL join test in test memoize.sql In-reply-to: References: Comments: In-reply-to David Rowley message dated "Mon, 23 Jan 2023 23:30:50 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2144817.1674517061.1@sss.pgh.pa.us> Date: Mon, 23 Jan 2023 18:37:41 -0500 Message-ID: <2144818.1674517061@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > Here we add a simple ORDER BY to stop the planner from being able to > pullup the lateral subquery. Hmmm ... we have an agreed syntax for a subquery optimization fence, and that ain't it. I wouldn't count on this not breaking again in the future. Why not OFFSET 0, which is the usual method? regards, tom lane