order by for user defined types

Поиск
Список
Период
Сортировка
От Kjetil Haaland
Тема order by for user defined types
Дата
Msg-id 200412031307.08886.kjetil.haaland@student.uib.no
обсуждение исходный текст
Ответы Re: order by for user defined types
Список 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 по дате отправления:

Предыдущее
От: Bret Busby
Дата:
Сообщение: Re: Books
Следующее
От: Sean Davis
Дата:
Сообщение: using a correlated subquery in update