uuid gin operator class - why not include for everybody? - Mailing list pgsql-general

From Seamus Abshere
Subject uuid gin operator class - why not include for everybody?
Date
Msg-id 1456327418.1667347.530604914.066FBEC0@webmail.messagingengine.com
Whole thread Raw
List pgsql-general
hi,

We want to use gin indexes on arrays of UUIDs. It is as simple as:

> CREATE OPERATOR CLASS _uuid_ops
> DEFAULT FOR TYPE _uuid
> USING gin AS
> OPERATOR 1 &&(anyarray, anyarray),
> OPERATOR 2 @>(anyarray, anyarray),
> OPERATOR 3 <@(anyarray, anyarray),
> OPERATOR 4 =(anyarray, anyarray),
> FUNCTION 1 uuid_cmp(uuid, uuid),
> FUNCTION 2 ginarrayextract(anyarray, internal, internal),
> FUNCTION 3 ginqueryarrayextract(anyarray, internal, smallint, internal, internal, internal, internal),
> FUNCTION 4 ginarrayconsistent(internal, smallint, anyarray, integer, internal, internal, internal, internal),
> STORAGE uuid;

Is there a reason not to put this into postgres itself? This already
exists for text[].

Thanks,
Seamus


--
Seamus Abshere, SCEA
+598 99 54 99 54
https://github.com/seamusabshere


pgsql-general by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: json function question
Next
From: Bala Venkat
Date:
Subject: Re: Perfomance issue. statement in the log file..