Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci5QD-00036f-9O for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Feb 2017 20:27:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ci5QC-0003Sa-HA for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Feb 2017 20:27:56 +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 1ci5Oj-0000j3-Ho for pgsql-hackers@postgresql.org; Sun, 26 Feb 2017 20:26:25 +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 1ci5Od-0007vv-JB for pgsql-hackers@postgresql.org; Sun, 26 Feb 2017 20:26:25 +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 v1QKQH1B019853; Sun, 26 Feb 2017 15:26:17 -0500 From: Tom Lane To: Andrew Dunstan cc: PostgreSQL-development Subject: Re: btree_gin and btree_gist for enums In-reply-to: <8a9a7d1a-54e4-4d76-ddd6-f5a8f1829de3@2ndQuadrant.com> 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> <12734.1488042261@sss.pgh.pa.us> <4e730f28-742b-45e9-d507-4d292fbd7834@2ndQuadrant.com> <22791.1488047671@sss.pgh.pa.us> <8a9a7d1a-54e4-4d76-ddd6-f5a8f1829de3@2ndQuadrant.com> Comments: In-reply-to Andrew Dunstan message dated "Sun, 26 Feb 2017 15:09:13 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19851.1488140777.1@sss.pgh.pa.us> Date: Sun, 26 Feb 2017 15:26:17 -0500 Message-ID: <19852.1488140777@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: > This works for the btree_gin case. However, there's a difficulty for > btree_gist - in the puicksplit routine the cmp function is passed to > qsort() so there is no chance to pass it an flinfo to set up the call to > the real comparison routine. Implementing a custom sort routine to work > around the problem seems a bridge too far. I can;t think of an > alternative off hand. We already have qsort_arg ... can't you change it to use that? 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