Re: Is this "order by" logic right

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Josué Maldonado <josue(at)lamundial(dot)hn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is this "order by" logic right
Date: 2003-09-24 14:53:35
Message-ID: 20030924075105.B53596@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2003-09-24 15:10:37 Re: Accessing tables from different databases
Previous Message Josué Maldonado 2003-09-24 14:42:48 Is this "order by" logic right