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 1nJerN-0005y1-6i for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 17:09:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJerL-00022M-H8 for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 17:09:55 +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 1nJerL-00022D-7p for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 17:09:55 +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 1nJerG-0003XA-Il for pgsql-hackers@postgresql.org; Mon, 14 Feb 2022 17:09:54 +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 21EH9lkf2905877; Mon, 14 Feb 2022 12:09:47 -0500 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: automatically generating node support functions In-reply-to: <812ea8eb-6827-ba32-6ec0-6714f7ffa5dd@enterprisedb.com> References: <2f876203-7142-fa71-6d22-6ce00eb26869@enterprisedb.com> <50fedc80-4104-bdc8-d777-04f030fc550f@dunslane.net> <7848b872-7a10-67b2-b55f-7c9c475ae863@enterprisedb.com> <40a2e977-98ba-0c01-af6c-9dfb39e864ba@enterprisedb.com> <812ea8eb-6827-ba32-6ec0-6714f7ffa5dd@enterprisedb.com> Comments: In-reply-to Peter Eisentraut message dated "Mon, 14 Feb 2022 11:15:57 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2905875.1644858587.1@sss.pgh.pa.us> Date: Mon, 14 Feb 2022 12:09:47 -0500 Message-ID: <2905876.1644858587@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Eisentraut writes: > What do people think about this patch now? I'm in favor of moving forward with this. I do not like the libclang-based approach that Andres was pushing, because of the jump in developer tooling requirements that it'd cause. Eyeballing the patch a bit, I do have some comments: * It's time for action on the business about extracting comments from the to-be-deleted code. * The Perl script is kind of under-commented for my taste. It lacks a copyright notice, too. * In the same vein, I should not have to reverse-engineer what the available pg_node_attr() properties are or do. Perhaps they could be documented in the comment for the pg_node_attr macro in nodes.h. * Maybe the generated file names could be chosen less opaquely, say ".funcs" and ".switch" instead of ".inc1" and ".inc2". * I don't understand why there are changes in the #include lists in copyfuncs.c etc? * I think that more thought needs to be put into the format of the *nodes.h struct declarations, because I fear pgindent is going to make a hash of what you've done here. When we did similar stuff in the catalog headers, I think we ended up moving a lot of end-of-line comments onto their own lines. * I assume the pg_config_manual.h changes are not meant for commit? regards, tom lane