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

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

  1. Add uuid to the set of types supported by contrib/btree_gist.