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