From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: btree_gin and btree_gist for enums |
Date: | 2017-02-27 21:22:03 |
Message-ID: | 1c283f8e-7f26-d2e9-7860-7c4a38390051@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 02/26/2017 04:09 PM, Andrew Dunstan wrote:
>
> On 02/26/2017 03:26 PM, Tom Lane wrote:
>> Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> 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?
>>
>>
>
> Yes, wasn't aware of that, that looks like exactly what I need. thanks.
>
>
OK, here's the whole series of patches.
Patch 1 adds the CallerFInfoFunctionCall{1,2} functions.
Patch 2 adds btree_gist support for their use for non-varlena types
Patch 3 does the same for varlena types (Not required for patch 4, but
better to be consistent, I think.)
Patch 4 adds enum support to btree_gist
Patch 5 adds enum support to btree_gin
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0004-Add-btree_gist-support-for-enum-types.patch | text/x-diff | 16.5 KB |
0003-CallerFInfoFunctionCall-support-for-btree_gist-varlena-types.patch | text/x-diff | 26.6 KB |
0002-CallerFInfoFunctionCall-support-for-btree_gist-non-varlena-types.patch | text/x-diff | 55.1 KB |
0001-Provide-a-direct-function-call-mechanism-that-uses-t.patch | text/x-diff | 4.1 KB |
0005-Add-btree_gin-support-for-enum-types.patch | text/x-diff | 7.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2017-02-27 21:24:24 | Re: Documentation improvements for partitioning |
Previous Message | David E. Wheeler | 2017-02-27 21:00:20 | Re: removing tsearch2 |