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 1mcwe6-0001Lk-Dx for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Oct 2021 21:27:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcwe5-0006ZY-9j for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Oct 2021 21:27:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcwe5-0006Vb-0w for pgsql-hackers@lists.postgresql.org; Tue, 19 Oct 2021 21:27:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcwdy-0007lP-IT for pgsql-hackers@lists.postgresql.org; Tue, 19 Oct 2021 21:27:40 +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 19JLRUGK2007364; Tue, 19 Oct 2021 17:27:30 -0400 From: Tom Lane To: Daniel Gustafsson cc: Alvaro Herrera , pgsql-hackers@lists.postgresql.org Subject: Re: Refactoring pg_dump's getTables() In-reply-to: References: <202110172005.z4gsdny63hzt@alvherre.pgsql> Comments: In-reply-to Daniel Gustafsson message dated "Tue, 19 Oct 2021 15:12:43 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2007362.1634678850.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 19 Oct 2021 17:27:30 -0400 Message-ID: <2007363.1634678850@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 17 Oct 2021, at 22:05, Alvaro Herrera wrote= : >> Maybe I would group together the changes that all require the same vers= ion >> test, rather than keeping the output columns in the same order. > I agree with that, if we're doing all this we might as well go all the w= ay for > readability. I had a go at doing that, but soon decided that it wasn't as great an idea as it first seemed. There are two problems: 1. It's not clear what to do with fields where there are three or more variants, such as reloptions and checkoptions. 2. Any time we modify the behavior for a particular field, we'd have to merge or un-merge it from the stanza for the previously-most-recently-relevant version. This seems like it'd be a maintenance headache and make patch footprints bigger than they needed to be. So I ended up not doing very much merging. I did make an effort to group the fields in perhaps a slightly more logical order than before. regards, tom lane