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

From Kjetil Haaland
Subject order by for user defined types
Date
Msg-id 200412031307.08886.kjetil.haaland@student.uib.no
Whole thread Raw
Responses Re: order by for user defined types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hello

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? It probably is,
since i get an error saying:
"could not identify an ordering operator for type alignres"
and a hint:
"Use an explicit ordering operator or modify the query".

If i am going to write my own ordering operator, is it then possible to call
the ordering operator function that postgres already has inside my function
and specify what to order on, or do i have to write my own sorting algorithm
too?

thanks

-Kjetil

pgsql-novice by date:

Previous
From: Bret Busby
Date:
Subject: Re: Books
Next
From: Sean Davis
Date:
Subject: using a correlated subquery in update