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 1mcEnN-0007cp-Ag for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Oct 2021 22:38:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcEnK-0005YL-Ih for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Oct 2021 22:38:18 +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 1mcEnK-0005YA-8t for pgsql-hackers@lists.postgresql.org; Sun, 17 Oct 2021 22:38:18 +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 1mcEnH-0006Yv-Tj for pgsql-hackers@lists.postgresql.org; Sun, 17 Oct 2021 22:38:17 +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 19HMcC661477472; Sun, 17 Oct 2021 18:38:12 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@lists.postgresql.org Subject: Re: Refactoring pg_dump's getTables() In-reply-to: <202110172005.z4gsdny63hzt@alvherre.pgsql> References: <202110172005.z4gsdny63hzt@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Sun, 17 Oct 2021 17:05:25 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1477470.1634510292.1@sss.pgh.pa.us> Date: Sun, 17 Oct 2021 18:38:12 -0400 Message-ID: <1477471.1634510292@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > Yeah, this seems a lot better than the original coding. Maybe I would > group together the changes that all require the same version test, > rather than keeping the output columns in the same order. This reduces > the number of branches. Because the follow-on code uses column names > rather than numbers, there is no reason to keep related columns > together. But it's a clear improvement even without that. Yeah, I thought about rearranging the code order some more, but desisted since it'd make the patch footprint a bit bigger (I'd want to make all the related stanzas list things in a uniform order). But maybe we should just do that. regards, tom lane