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 1m3q7f-0005sR-QH for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jul 2021 01:25:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3q7e-0003C6-I0 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jul 2021 01:25:06 +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 1m3q7d-0003By-43 for pgsql-hackers@lists.postgresql.org; Thu, 15 Jul 2021 01:25:06 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3q7Z-00081M-Kt for pgsql-hackers@postgresql.org; Thu, 15 Jul 2021 01:25:04 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 3B78E320092A; Wed, 14 Jul 2021 21:24:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 14 Jul 2021 21:24:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=WPnvpzI197SJq3+szEA/rKg2/nX v5TFspjoeHeFm7V0=; b=I2ITGJQzg755C1KaxL/qxWWO664EBbhNrc8hZsyIkwi nC3IoleoGQ/XvZL2BhZ8LSlHLllb3TEhdHl73HW40H7/tGfz7ePvxSiFzb+WA4Ee hIv7xLf04fqxc0LkgZ9SCL4eBqg8OO8q58Qg4uR4d1TzuQ+S5dep+IW0b+1474FU XNd9BND/bQkut4loc2HT3GpDj3oIiOSi5PqfmW6TH8w9zsm0HSs8dPVyUhaJ3sSz UbbmKSJUPI5FAvh/a9ra/khtybq3Lq5uBnRFxddRvA+QSRa6aiTMoFXs2+HEs3kC aOC5Nde4KuW3vW6k3nF74Rc6yz181MhgEJWlHHchhgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=WPnvpz I197SJq3+szEA/rKg2/nXv5TFspjoeHeFm7V0=; b=RpO59RUX9Vnw56HgjgrH7p 614777cceEPhrdMGLGM7s8Ky11L3WcvAbZXu553fg0X3SdG0TEzlMzxwmB++D42E gb1sBy9W8sl52oNY+0vifeE3VI5FwX6zdGPmQbFzkt1GurUJPMW721c+keAReBum jCkO6JQJPfRb0nZrIgF7wFA2Ev8UUm73punOSSaB6hAoMxIYzIE+hUgvclC7EgRP aBJBMDhgwzua0syb0OtVQN07FfigEKoXD0FUZ4OPpBQUii+/JR4eGcxSL/6Be6YM TE06Q+JTnutwg8qDyk7ukcOR5qPMM4mzETZUhllxqRsV75WdAD2a6+YeR9IZIYWA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jul 2021 21:24:56 -0400 (EDT) Date: Wed, 14 Jul 2021 18:24:54 -0700 From: Andres Freund To: Tom Lane Cc: Peter Eisentraut , David Rowley , pgsql-hackers Subject: Re: automatically generating node support functions Message-ID: <20210715012454.bvwg63farhmfwb47@alap3.anarazel.de> References: <20210611192353.ugmjp2txdwp2duls@alap3.anarazel.de> <3569906.1626298930@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3569906.1626298930@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2021-07-14 17:42:10 -0400, Tom Lane wrote: > I think the main reason that the previous patch went nowhere was general > resistance to making developers install something as complicated as > libclang --- that could be a big lift on non-mainstream platforms. I'm still not particularly convinced it's and issue - I was suggesting we commit the resulting metadata, so libclang would only be needed when modifying node types. And even in case one needs to desperately modify node types on a system without access to libclang, for an occasionally small change one could just modify the committed metadata structs manually. > So IMO it's a feature not a bug that Peter's approach just uses a perl > script. OTOH, the downstream aspects of your patch did seem appealing. > So I'd like to see a merger of the two approaches, using perl for the > data extraction and then something like what you'd done. Maybe that's > the same thing you're saying. Yes, that's what I was trying to say. I'm still doubtful it's a great idea to go further down the "weird subset of C parsed by regexes" road, but I can live with it. If Peter could generate something roughly like the metadata I emitted, I'd rebase my node functions ontop of that. > I also see Peter's point that committing what he has here might be > a reasonable first step on that road. Getting the data extraction > right is a big chunk of the job, and what we do with it afterward > could be improved later. To me that seems likely to just cause churn without saving much effort. The needed information isn't really the same between generating the node functions as text and collecting the metadata for "generic node functions", and none of the output is the same. Greetings, Andres Freund