View Single Post

   
  #5 (permalink)  
Old 04-11-2008, 06:53 AM
Grzegorz Jaskiewicz
 
Posts: n/a
Default Re: order by, for custom types


On 2005-11-18, at 22:53, Tom Lane wrote:

> Grzegorz Jaskiewicz <gj@pointblue.com.pl> writes:
>> I have all operators required for b-tree, gist up here, and gist
>> index defined. But still "order by custom_type" won't work.

>
> Define "won't work" ... what happens?
>


Wildcards cause things not to work as they should

consider everything in [] brackets to be a possible choice and those
three:

a = 1.2.3.4
b = 1.[2,3].3.4
c = 1.3.3.4

a = b, b = c, but a <> c, I was told that because of that btree won't
work on my type. (on irc, that was AndrewSN as I recall).


> You don't need an index, but a b-tree operator class is a good idea.
> Still, it should be possible to sort with only a "<" operator --- at
> the moment anyway. (I've been thinking about some ideas that would
> effectively require a b-tree opclass to do sorting, so this might not
> still be true in 8.2 ...)


I do have all operators required for btree, no operator class
defined, every single operator. Btree requires some function apart
from operators, this one is not defined, but I do have = operator as
well.

--
GJ

"If we knew what we were doing, it wouldn't be called Research, would
it?" - AE




---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Reply With Quote