Review: GiST support for UUIDs
Teodor Sigaev <teodor@sigaev.ru>
From: Teodor Sigaev <teodor@sigaev.ru>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>,
Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2015-09-14T15:57:54Z
Lists: pgsql-hackers
Attachments
- btree_gist_uuid_2.patch (text/plain) patch
http://www.postgresql.org/message-id/flat/CA+renyVepHxTO1c7dFbVjP1GYMUc0-3qDNWPN30-noo5MPyaVQ@mail.gmail.com#CA+renyVepHxTO1c7dFbVjP1GYMUc0-3qDNWPN30-noo5MPyaVQ@mail.gmail.com
Patch looks perfect but it's still needed some work.
0) rebase to current HEAD (done, in attach)
1) UUIDSIZE -> UUID_LEN (it's defined in utils/uuid.h, done)
2)
static double
uuid2num(const pg_uuid_t *i)
{
return *((uint64 *)i);
}
It isn't looked as correct transformation for me. May be, it's better
to transform to numeric type (UUID looks like a 16-digit hexademical number)
and follow gbt_numeric_penalty() logic (or even call directly).
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/
Commits
-
Add uuid to the set of types supported by contrib/btree_gist.
- 11da83a0e70d 10.0 landed