Re: self defined data type "with limit"?

Поиск
Список
Период
Сортировка
От Michael Enke
Тема Re: self defined data type "with limit"?
Дата
Msg-id 468375DE.1070305@wincor-nixdorf.com
обсуждение исходный текст
Ответ на Re: self defined data type "with limit"?  (Heikki Linnakangas <heikki@enterprisedb.com>)
Ответы Re: self defined data type "with limit"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

Heikki Linnakangas wrote:
> Michael Enke wrote:
> 
>> My primary goal is to get quasi numeric ordering on text column, e.g.
>> 1
>> 2
>> 10
>> Normal order with varchar would be
>> 1
>> 10
>> 2
> 
> 
> You don't need to custom type for that. A custom operator class with 
> custom comparison operators is enough.
> 

Ok, I tried with ordinary varchar and my own operators/op class. But than:
1) the index is never used (I created it 'with' my opclass)
2) the 'order by' doesn't care about my operator class, it's normal varchar sequence.

Regards,
Michael


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeremy Drake
Дата:
Сообщение: Re: Bugtraq: Having Fun With PostgreSQL
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Bgwriter LRU cleaning: we've been going at this all wrong