Re: [GENERAL] Comparing arrays of composite types

2009-08-21 Thread Alban Hertroys
On 21 Aug 2009, at 22:12, Tom Lane wrote: Alban Hertroys writes: I have created operators on unit_token for =, <, <=, > and >=, but either I did something wrong defining my operators or the error is pointing to some other problem. The mere fact that the operator is named '=' means nothing to

Re: [GENERAL] Comparing arrays of composite types

2009-08-21 Thread Tom Lane
Alban Hertroys writes: > I defined a type: > CREATE TYPE unit_token AS ( > base_unit TEXT, > unit_base INT > ); > If I try to join on tokens or try to create an index over that column > I get: "ERROR: could not identify a comparison function for type > unit_token". A

Re: [GENERAL] Comparing arrays of composite types

2009-08-21 Thread Merlin Moncure
On Fri, Aug 21, 2009 at 2:59 PM, Alban Hertroys wrote: > Hello all, > > I'm running into a small problem (while comparing tokenised unit strings in > case you're interested) with said topic. > > I defined a type: > CREATE TYPE unit_token AS ( >        base_unit       TEXT, >        unit_base      

[GENERAL] Comparing arrays of composite types

2009-08-21 Thread Alban Hertroys
Hello all, I'm running into a small problem (while comparing tokenised unit strings in case you're interested) with said topic. I defined a type: CREATE TYPE unit_token AS ( base_unit TEXT, unit_base INT ); In my table I have: CREATE TABLE unit ( unitT