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

From Greg Stark
Subject Re: order by, for custom types
Date
Msg-id 87iruppw1o.fsf@stark.xeocode.com
Whole thread Raw
In response to order by, for custom types  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
List pgsql-hackers
Grzegorz Jaskiewicz <gj@pointblue.com.pl> writes:

> Hi folks
> 
> I have all operators required for b-tree, gist up here, and gist  index
> defined. But still "order by custom_type" won't work.

I think you need to create an "operator class" for ORDER BY to work. Someone
else may answer with more details.

> 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 ?
> Perhaps gist should be expanded so it would take care of "order by"  and
> "distinct" ?

This I don't understand. If ORDER BY will work then b-tree indexes will work
too. If your type is such that b-tree indexes don't make sense then neither
does ORDER BY.

-- 
greg



pgsql-hackers by date:

Previous
From: Gregory Maxwell
Date:
Subject: Re: Improving count(*)
Next
From: Martijn van Oosterhout
Date:
Subject: Re: someone working to add merge?