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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Viktor Rosenfeld <listuser36(at)googlemail(dot)com>
Cc: Sam Mason <sam(at)samason(dot)me(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: could not identify an equality operator for type annotation (Was: could not find array type for data type character varying[])
Date: 2009-10-28 22:23:26
Message-ID: 20334.1256768606@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Viktor Rosenfeld <listuser36(at)googlemail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2009-10-28 22:37:44 Re: Postgres alpha testing docs and general test packs
Previous Message Guillaume Lelarge 2009-10-28 22:18:42 Re: Postgres alpha testing docs and general test packs