Re: order by, for custom types

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: order by, for custom types
Date: 2005-11-18 19:58:59
Message-ID: 87iruppw1o.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-11-18 20:03:25 Re: someone working to add merge?
Previous Message Gregory Maxwell 2005-11-18 19:56:52 Re: Improving count(*)