Thread: uuid gin operator class - why not include for everybody?

uuid gin operator class - why not include for everybody?

From
Seamus Abshere
Date:
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