Re: btree_gin and btree_gist for enums

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: emre@hasegeli.com, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2016-11-05T15:46:51Z
Lists: pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The real problem here is that enum_cmp_internal assumes that 
> fcinfo->flinfo has been set up, and DirectFunctionCallN doesn't, it sets 
> it to NULL.
> The patch below cures the problem. I'm not sure if there is a better 
> way. Thoughts?

That may be a good fix for robustness purposes, but it seems pretty horrid
from an efficiency standpoint.  Where is this call, and should we be
modifying it to provide a flinfo?

			regards, tom lane


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.