numeric SORT order

From: Ben Ausden <benedict(at)navyblue(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: numeric SORT order
Date: 2002-01-28 20:47:10
Message-ID: 4174BB57B89ED411A8BB000102A30F51406155@NAVY
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is there any way to persuade postgresql to sort a VARCHAR column in numeric
order first, and then text order?

e.g

1, 2, 3, 10, 20, 25, 30, 40

instead of:

1, 10, 2, 20, 25, 3, 30, 40

From looking at the docs it seems that sort order is determined by the
locale settings. Is this right, and would setting my locale to en_US cause
postgres to use a different sort order?

thanks,
ben

--
ben ausden

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2002-01-28 20:57:24 Re: NEWBIE: Can't unpack RPMs
Previous Message tony 2002-01-28 20:21:05 Re: NEWBIE: Can't unpack RPMs