From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Umashanker, Srividhya *EXTERN*" <srividhya(dot)umashanker(at)hp(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Alphanumeric natural order sorting : need generic solution |
Date: | 2013-03-22 10:03:17 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B057CA8AF@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Umashanker, Srividhya wrote:
> I am looking for a generic solution to get the Alphanumeric sorting.
>
> * The user can request for any field to be sorted.
> * There is no specific format the alphanumeric string can follow. So that we can split using
> regex and split and sorted.
> * Need an efficient way. Should not degrade performance.
>
> I tried all possible collation example -- select * from test order by name collate "en_US";
>
> Is there someone who has solved this problem with writing a function?
>
> Below are more details -
> I am expecting
>
> 1, bay1
> 2, bay2
> 10, bay10
> 11, bay11
The answer is the same as on the other mailing list:
Define precisely (not only with an example) what you mean
by "alphanumeric sorting" and you are more likely to get a helpful answer.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2013-03-22 10:12:11 | Re: Alphanumeric natural order sorting : need generic solution |
Previous Message | Umashanker, Srividhya | 2013-03-22 07:40:19 | Alphanumeric natural order sorting : need generic solution |