Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTa39-0006lJ-Ho for pgsql-committers@arkaria.postgresql.org; Tue, 17 Jan 2017 20:08:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTa38-0000Df-9P for pgsql-committers@arkaria.postgresql.org; Tue, 17 Jan 2017 20:08:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTa2u-0008Ok-O5 for pgsql-committers@postgresql.org; Tue, 17 Jan 2017 20:07:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTa2p-0002mo-MH for pgsql-committers@postgresql.org; Tue, 17 Jan 2017 20:07:56 +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 v0HK7m9u003212; Tue, 17 Jan 2017 15:07:48 -0500 From: Tom Lane To: Peter Eisentraut cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Generate fmgr prototypes automatically In-reply-to: <40b53c62-4cf6-2d79-4aaa-c76a76532caa@2ndquadrant.com> References: <1771.1484681728@sss.pgh.pa.us> <40b53c62-4cf6-2d79-4aaa-c76a76532caa@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Tue, 17 Jan 2017 14:46:53 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3210.1484683668.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 17 Jan 2017 15:07:48 -0500 Message-ID: <3211.1484683668@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Peter Eisentraut writes: > On 1/17/17 2:35 PM, Tom Lane wrote: >> BTW, now that I've looked through this patch ... why does it add >>=20 >> +#include "nodes/nodes.h" >> +#include "nodes/pg_list.h" >>=20 >> to utils/builtins.h? > There are things in builtins.h that technically need those declarations. > It seems to work without it now, but at some point during the > refactoring they were necessary. I can remove them again. [ looks around ... ] Hm, it looks like the reason it works without them is that utils/sortsupport.h pulls in relcache.h, which pulls in a veritable buttload of stuff; those two and a whole lot more beside. That seems like a pretty bad idea. It's surely not the fault of this patch that the sortsupport patch didn't give a damn about inclusion footprints; but I still think we'd be well advised to minimize builtins.h's footprint now that it's going to need to be included very far and wide. It looks like we could get rid of the need for sortsupport.h in builtins.h via the good old "struct foo" forward reference trick, that is struct SortSupportData; extern void varstr_sortsupport(struct SortSupportData *ssup, Oid collid, bo= ol bpchar); but I wonder if that's going far enough. We'd still be propagating pg_list.h into a lot of places that don't necessarily need it. Alternatively ... is there a specific reason why you chose to make builtins.h the key inclusion file for this change, rather than having callers include fmgrprotos.h directly? It seems like the stuff remaining in builtins.h is just a laundry list of random utility functions. Maybe dispersing those to other headers is the thing to do. regards, tom lane --=20 Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers