Re: Index order - Mailing list pgsql-general

From Tom Lane
Subject Re: Index order
Date
Msg-id 28106.1221571591@sss.pgh.pa.us
Whole thread Raw
In response to Index order  (Glyn Astill <glynastill@yahoo.co.uk>)
Responses Re: Index order
List pgsql-general
Glyn Astill <glynastill@yahoo.co.uk> writes:
> I was just wondering if there's any way to tweak the way an an index is ordered on a text field?

> I have a table with a varchar field "artist" (see table def below),
and if I order by the field "artist" it does not order as expected when
there are characters such as ^ at the start of the text.

You didn't say what you consider "expected", but I suspect that the
answer is you want to use a different locale setting ... probably C.
Unfortunately there's currently no way to change that short of initdb.

            regards, tom lane

pgsql-general by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Index order
Next
From: "Merlin Moncure"
Date:
Subject: Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)