Re: DISTINCT ordering - Mailing list pgsql-novice

From Ron St-Pierre
Subject Re: DISTINCT ordering
Date
Msg-id 411915D7.7040801@syscor.com
Whole thread Raw
In response to Re: DISTINCT ordering  (Jake Stride <nsuk@users.sourceforge.net>)
List pgsql-novice
Jake Stride wrote:

>Because I don¹t want the name in lower case, what I want is
>
>The
>the
>Z
>
>not:
>
>The
>Z
>the
>
>
>

>This is what I have at present, although slightly adjusted, but I wanted to
>know if it was possible without 2 selects,
>
>SELECT SS.name FROM (SELECT DISTINCT name FROM someview) SS ORDER BY
> lower(name);
>
>Jake
>
>

In that case I don't think that you can do it without a subquery. I
think that if the db was configured with a different locale (en_GB or
en_US) it would sort the data as you want it, but I think that other
problems might occur. I haven't dealt with the locale settings much
myself, but there are frequently questions(problems?) such as yours
which show up on the GENERAL discussion list. You can search the GENERAL
archives and documentation if you want more background on this it it's a
big problem. Or perhaps someone with more 'locale' knowledge might
confirm this.

hth
Ron


pgsql-novice by date:

Previous
From: "Taber, Mark"
Date:
Subject: What constitutes a pgsql session?
Next
From: Eduardo Vázquez Rodríguez
Date:
Subject: Re: Query result to a file