Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chfnC-0006Zu-CN for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Feb 2017 17:05:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1chfnB-0006V9-SX for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Feb 2017 17:05:57 +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 1chflk-0004qZ-OC for pgsql-hackers@postgresql.org; Sat, 25 Feb 2017 17:04:28 +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 1chflh-00035n-IV for pgsql-hackers@postgresql.org; Sat, 25 Feb 2017 17:04:28 +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 v1PH4L7M012735; Sat, 25 Feb 2017 12:04:21 -0500 From: Tom Lane To: Andrew Dunstan cc: PostgreSQL-development Subject: Re: btree_gin and btree_gist for enums In-reply-to: References: <56EA8A71.8060107@dunslane.net> <56EACB8C.1040406@dunslane.net> <03f7d748-0f89-e8e1-094d-f04e1026b93d@dunslane.net> <27220.1478360811@sss.pgh.pa.us> <31412.1478366009@sss.pgh.pa.us> <60fb708c-8b3c-1337-934e-c1bfe2afc539@dunslane.net> <8258.1487886101@sss.pgh.pa.us> <4376a7bf-ab8c-e640-9021-94b148f9d733@2ndQuadrant.com> <6704.1487952174@sss.pgh.pa.us> <930cb563-6dc6-c4af-3be9-31f06c60361e@2ndQuadrant.com> <8a8c60b4-39c0-69a4-824c-e364f5fd97ea@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Sat, 25 Feb 2017 11:51:48 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12733.1488042261.1@sss.pgh.pa.us> Date: Sat, 25 Feb 2017 12:04:21 -0500 Message-ID: <12734.1488042261@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andrew Dunstan writes: > On 02/24/2017 05:34 PM, Andrew Dunstan wrote: >> It's occurred to me that we could reduce the code clutter in fmgr.c a >> bit by turning the DirectFunctionCall{n]Coll functions into macros >> calling these functions and passing NULL as the flinfo param. > here's a patch along those lines. If there's agreement on this I can > finish up the work on btree_gist and btree_gin supoport for enums. I'm not really thrilled with doing it like that, for two reasons: 1. This makes it look like CallerFInfoFunctionCallN is the more basic, common interface, which it isn't and never will be. At best, that's confusing. And I don't like having only one documentation block covering both interfaces; that does nothing for clarity either. 2. By my count there are over 500 uses of DirectFunctionCallN in the backend. This will add an additional hidden parameter to each one, implying code bloat and some fractional speed cost. I think it'd be better to leave DirectFunctionCallN alone and just invent a small number of CallerFInfoFunctionCallN support functions (maybe N=1 and N=2 would be enough, at least for now). regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers