Re: btree_gin and btree_gist for enums

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Matt Wilmas <pgsql_lists@realplain.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-03-24T22:18:00Z
Lists: pgsql-hackers

On 03/24/2016 12:40 PM, Matt Wilmas wrote:
>
>
> It would be *really* nice to have this in 9.6.  It seems it's simply 
> filling out functionality that should already be there, right?  An 
> oversight/bug fix so it works "as advertised?" :-)


I think that would be stretching the process a bit far. I'm certainly 
not prepared to commit it unless there is a general consensus to make an 
exception for it.


> Is any other btree type-compatibility missing from these modules?  (I 
> notice the btree_gin docs don't mention "numeric," but it works.)


uuid would be another type that should be fairly easily covered but isn't.


>
>
> I just looked over the patch, and the actual code addition/changes 
> seem pretty small and straightforward (or am I wrong?). 



Yes, sure, it's all fairly simple. Took me a little while to understand 
what I was doing, but once I did it was pretty much plain sailing.

cheers

andrew




Commits

  1. Add btree_gin support for enum types

  2. Add btree_gist support for enum types.

  3. Use CallerFInfoFunctionCall with btree_gist for numeric types

  4. Add a direct function call mechanism using the caller's context.

  5. Add support for EUI-64 MAC addresses as macaddr8

  6. Add an Assert that enum_cmp_internal() gets passed an FmgrInfo pointer.