order by for user defined types

From: Kjetil Haaland <kjetil(dot)haaland(at)student(dot)uib(dot)no>
To: pgsql-novice(at)postgresql(dot)org
Subject: order by for user defined types
Date: 2004-12-03 12:07:08
Message-ID: 200412031307.08886.kjetil.haaland@student.uib.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2004-12-03 13:18:27 using a correlated subquery in update
Previous Message Bret Busby 2004-12-03 06:16:32 Re: Books