Re: could not identify an equality operator for type annotation (Was: could not find array type for data type character varying[]) - Mailing list pgsql-general

From Tom Lane
Subject Re: could not identify an equality operator for type annotation (Was: could not find array type for data type character varying[])
Date
Msg-id 20334.1256768606@sss.pgh.pa.us
Whole thread Raw
In response to could not identify an equality operator for type annotation (Was: could not find array type for data type character varying[])  (Viktor Rosenfeld <listuser36@googlemail.com>)
List pgsql-general
Viktor Rosenfeld <listuser36@googlemail.com> writes:
> this looks good, but it does not work with DISTINCT.

>   CREATE TYPE annotation AS ( namespace varchar, name varchar, value varchar );

>   ERROR:  could not identify an equality operator for type annotation

My recollection is you need a complete btree operator class to support
DISTINCT.  8.4 would provide that automatically for composite types,
but in 8.3 you'll have to build it yourself.

> I've also tried [ a hash opclass ]
> But then the error message changes to:
>   ERROR:  cache lookup failed for operator 34755

That's not what I get when I copy your example, so I think you left
something out.

            regards, tom lane

pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Postgres alpha testing docs and general test packs
Next
From: Guillaume Lelarge
Date:
Subject: Re: Postgres alpha testing docs and general test packs