Re: self defined data type "with limit"? - Mailing list pgsql-hackers

From Michael Enke
Subject Re: self defined data type "with limit"?
Date
Msg-id 468375DE.1070305@wincor-nixdorf.com
Whole thread Raw
In response to Re: self defined data type "with limit"?  (Heikki Linnakangas <heikki@enterprisedb.com>)
Responses Re: self defined data type "with limit"?
List 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 by date:

Previous
From: Jeremy Drake
Date:
Subject: Re: Bugtraq: Having Fun With PostgreSQL
Next
From: Greg Smith
Date:
Subject: Re: Bgwriter LRU cleaning: we've been going at this all wrong