Re: Is this "order by" logic right - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Is this "order by" logic right
Date
Msg-id 20030924075105.B53596@megazone.bigpanda.com
Whole thread Raw
In response to Is this "order by" logic right  (Josué Maldonado <josue@lamundial.hn>)
Responses Re: Is this "order by" logic right  (Josué Maldonado <josue@lamundial.hn>)
List pgsql-general
On Wed, 24 Sep 2003, [ISO-8859-1] Josué Maldonado wrote:

> Hello list,
>
> The query has the following in the where:
>
> UPPER(cty_Name) LIKE 'NEW%' ORDER BY cty_name
>
> it returns the data in this way:
>
> Newark
> Newark
> New Britain
> Newburgh
> New Cannan
> New Castle
> Newcomerstown
>
> The table has index on cty_name (btree), I'll appreciate any comments or
> suggestions about it.

You haven't given your locale or system type, but this seems reasonably
if you're in a locale that generally ignores spaces (for example my redhat
machine does so in en_US).  If you want byte order sorting, you'll
probably need to re-initdb with LC_COLLATE set to "C"


pgsql-general by date:

Previous
From: maufaini@tiscali.it (Maurizio Faini)
Date:
Subject: Re: GET LAST ID INSERT
Next
From: Pavel Stehule
Date:
Subject: Re: Accessing tables from different databases