Re: order by, for custom types - Mailing list pgsql-hackers

From Tom Lane
Subject Re: order by, for custom types
Date
Msg-id 8965.1132350791@sss.pgh.pa.us
Whole thread Raw
In response to order by, for custom types  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Responses Re: order by, for custom types  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
List pgsql-hackers
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?

> I have kind of wild card masks in my type definition, so b-tree won't  
> work. But still, do I need to define b-tree index as such for "order  
> by" to work ?

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 ...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Bug in predicate indexes?
Next
From: "Jonah H. Harris"
Date:
Subject: Re: PCTFree Results