Re: UUID datatype GiST index support
От | Alexander Korotkov |
---|---|
Тема | Re: UUID datatype GiST index support |
Дата | |
Msg-id | CAPpHfduv+n_WBxopz8_=kSapxjWZAd7U7LqHGv-6fHB6ioCBPg@mail.gmail.com обсуждение исходный текст |
Ответ на | UUID datatype GiST index support (Misa Simic <misa.simic@gmail.com>) |
Ответы |
Re: UUID datatype GiST index support
|
Список | pgsql-hackers |
Hi!
On Mon, Aug 22, 2011 at 2:54 PM, Misa Simic <misa.simic@gmail.com> wrote:
------Seems that you need the address-of operator before ia->upper and ia->lower (likely one of operands should be "ia->lower"). UUIDPGetDatum except pointer as an argument, i.e. UUIDPGetDatum(&ia->upper).static intm4_uuidkey_cmp(const void *a, const void *b){uuidKEY *ia = (uuidKEY *) (((Usrt *) a)->t);uuidKEY *ib = (uuidKEY *) (((Usrt *) b)->t);int res;res = DatumGetInt32(DirectFunctionCall2(uuid_cmp, UUIDPGetDatum(ia->upper), UUIDPGetDatum(ia->upper)));if (res == 0)return DatumGetInt32(DirectFunctionCall2(uuid_cmp, UUIDPGetDatum(ia->upper), UUIDPGetDatum(ib->upper)));return res;}Getting error: aggregate error used where an integer was expected!
It would be a lot appreciated if anyone could help me and suggest the best way to make Gist support for UUID datatype...
I think you're on the right way. btree_gist is an extension which provides GiST indexing of scalar datatype. UUID is one of them. So, the module you are writing should be quite similar.
With best regards,
Alexander Korotkov.
В списке pgsql-hackers по дате отправления: