Re: Gin index on array of uuid - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Gin index on array of uuid
Date
Msg-id 15293.1466536829@sss.pgh.pa.us
Whole thread Raw
In response to Gin index on array of uuid  (Enrique MailingLists <enrique.mailing.lists@gmail.com>)
Responses Re: Gin index on array of uuid
Re: Gin index on array of uuid
List pgsql-hackers
Enrique MailingLists <enrique.mailing.lists@gmail.com> writes:
> Currently creating an index on an array of UUID involves defining an
> operator class. I was wondering if this would be a valid request to add as
> part of the uuid-ossp extension? This seems like a reasonable operator to
> support as a default for UUIDs.

This makes me itch, really, because if we do this then we should logically
do it for every other add-on type.

It seems like we are not that far from being able to have just one GIN
opclass on "anyarray".  The only parts of this declaration that are
UUID-specific are the comparator function and the storage type, both of
which could be gotten without that much trouble, one would think.

> Any downsides to adding this as a default?

Well, it'd likely break things at dump/reload time for people who had
already created a competing "default for _uuid" opclass manually.  I'm not
entirely sure, but possibly replacing the core opclasses with a single one
that is "default for anyarray" could avoid such failures.  We'd have to
figure out ambiguity resolution rules.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_bsd_indent - improvements around offsetof and sizeof
Next
From: Tom Lane
Date:
Subject: Re: pg_bsd_indent - improvements around offsetof and sizeof