Re: order by for user defined types - Mailing list pgsql-novice

From Tom Lane
Subject Re: order by for user defined types
Date
Msg-id 21942.1102090507@sss.pgh.pa.us
Whole thread Raw
In response to order by for user defined types  (Kjetil Haaland <kjetil.haaland@student.uib.no>)
List pgsql-novice
Kjetil Haaland <kjetil.haaland@student.uib.no> writes:
> I have a defined my own type that i use in postgres. I have made some
> operators like >, => etc. so i can use it in a where clause in a query. I am
> now wondering if it is possible to do the same for order by?

You need to define a default btree index opclass for your datatype.  See
the chapter "Interfacing Extensions to Indexes" in the documentation.

            regards, tom lane

pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: using a correlated subquery in update
Next
From: "clayton"
Date:
Subject: Postgre 8 beta 5