Re: btree_gin and btree_gist for enums
Matt Wilmas <pgsql_lists@realplain.com>
From: "Matt Wilmas" <pgsql_lists@realplain.com>
To: "Andrew Dunstan" <andrew@dunslane.net>, "PostgreSQL-development" <pgsql-hackers@postgresql.org>
Date: 2016-03-24T16:40:48Z
Lists: pgsql-hackers
Hi Andrew, all, First message here! I didn't get around to sending an intro/"thank you all" e-mail yet, and a small performance (?) patch+idea(s)... (CPU stuff, since I don't otherwise know much about PG internals.) Anyway... ----- Original Message ----- From: "Andrew Dunstan" Sent: Thursday, March 17, 2016 > Here is a patch to add enum support to btree_gin and btree_gist. I > didn't include distance operations, as I didn't think it terribly > important, and there isn't a simple way to compute it sanely and > efficiently, so no KNN support. Major thanks for coming up with this a week after your "enums and indexing" message. My love of all things Postgres has a lot to do with being able to do nearly anything one could want (coming from MySQL :-/)! So I was like, "Wait, what?" when you brought up the subject, since this was something I hadn't actually tried, but was planning to use btree_gin/gist with a good mix of stuff, including enums (array and scalar). At first I thought it was just arrays of enums, until this patch for the contrib extensions (for the btree parts with GIN/GiST; plus GiST exclusion?), and your blog posts... [1][2] I wasn't certain from the second post whether your array solution can be used today without this patch (yes, just tried 9.5). So, two separate issues, and the patch addresses scalar stuff, IIUC. 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?" :-) Is any other btree type-compatibility missing from these modules? (I notice the btree_gin docs don't mention "numeric," but it works.) I just looked over the patch, and the actual code addition/changes seem pretty small and straightforward (or am I wrong?). And it's not changing anything in the core, so... Well, just wanted to argue my case! :^) [1] http://adpgtech.blogspot.com/2016/03/gist-and-gin-support-for-enums.html [2] http://adpgtech.blogspot.com/2016/03/gin-indexing-array-of-enums.html > cheers > > andrew Thanks, Matt
Commits
-
Add btree_gin support for enum types
- 4ad0f88c443c 10.0 landed
-
Add btree_gist support for enum types.
- f7946a92b689 10.0 landed
-
Use CallerFInfoFunctionCall with btree_gist for numeric types
- 4b1c68d63e86 10.0 landed
-
Add a direct function call mechanism using the caller's context.
- 29bf5016835a 10.0 landed
-
Add support for EUI-64 MAC addresses as macaddr8
- c7a9fa399d55 10.0 cited
-
Add an Assert that enum_cmp_internal() gets passed an FmgrInfo pointer.
- 6d493e1a0135 10.0 landed