Skip site navigation (1) Skip section navigation (2)

Review: GiST support for UUIDs

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Review: GiST support for UUIDs
Date: 2015-09-14 15:57:54
Message-ID: 55F6EE82.8080209@sigaev.ru (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
http://www.postgresql.org/message-id/flat/CA+renyVepHxTO1c7dFbVjP1GYMUc0-3qDNWPN30-noo5MPyaVQ(at)mail(dot)gmail(dot)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(at)sigaev(dot)ru
                                                    WWW: http://www.sigaev.ru/

Attachment: btree_gist_uuid_2.patch
Description: text/plain (120.3 KB)

Responses

pgsql-hackers by date

Next:From: Andres FreundDate: 2015-09-14 16:02:08
Subject: Re: Review: GiST support for UUIDs
Previous:From: Andres FreundDate: 2015-09-14 15:41:42
Subject: Re: Move PinBuffer and UnpinBuffer to atomics

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group