Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTVYe-0006Qn-62 for pgsql-committers@arkaria.postgresql.org; Wed, 22 May 2019 18:01:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hTVYc-0001YQ-Nz for pgsql-committers@arkaria.postgresql.org; Wed, 22 May 2019 18:01:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTVYc-0001YJ-E6 for pgsql-committers@lists.postgresql.org; Wed, 22 May 2019 18:01:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTVYa-0004D4-7L for pgsql-committers@lists.postgresql.org; Wed, 22 May 2019 18:01:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x4MI1cvb007017; Wed, 22 May 2019 14:01:38 -0400 From: Tom Lane To: fabriziomello@gmail.com cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix O(N^2) performance issue in pg_publication_tables view. In-reply-to: References: Comments: In-reply-to =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= message dated "Wed, 22 May 2019 14:47:41 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7014.1558548098.1@sss.pgh.pa.us> Date: Wed, 22 May 2019 14:01:38 -0400 Message-ID: <7015.1558548098@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > Just one doubt, why use LATERAL with pg_get_publication_tables SRF instead > of JOIN direct to pg_publication_rel? Yes, LATERAL is just a noise word in this context, but I think it's good for documentation purposes. If you're asking why I used a comma instead of JOIN ... ON TRUE, it's because I don't find the latter to be particularly readable or good style. YMMV. (I agree it's a little weird that the original coding had a mix of comma and JOIN syntax, but I did not feel a need to revisit that.) regards, tom lane