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

From Heikki Linnakangas
Subject Re: self defined data type "with limit"?
Date
Msg-id 4682A16D.6040800@enterprisedb.com
Whole thread Raw
In response to Re: self defined data type "with limit"?  (Michael Enke <michael.enke@wincor-nixdorf.com>)
Responses Re: self defined data type "with limit"?  (Michael Enke <michael.enke@wincor-nixdorf.com>)
List pgsql-hackers
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.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Michael Enke
Date:
Subject: Re: self defined data type "with limit"?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: GiST consistent function, expected arguments; multi-dimensional indexes