pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jodi Kanter <jkanter@virginia.edu>
Cc: Postgres SQL List <pgsql-sql@postgresql.org>
Subject: Re: order by
Date: Wed, 26 Mar 2003 10:44:33 -0800 (PST)
Message-ID: <20030326104353.P63544-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <005501c2f3c3$43f8db30$de138f80@virginia.edu>

On Wed, 26 Mar 2003, Jodi Kanter wrote:

> Is there a known problem with the SQL order by clause within postgres
> version 7.2.3? I am trying to sort a field which holds file names that
> have some spaces as well non-alphanumeric characters, including
> underscores (see below).
>
> The results of:
> select study_name from study order by study_name;
>
>
>   Study1a
>   Study 1b
>   Study  1c
>   Study1d
>
>
> The results of sorting in Perl (which uses Linux's underlying sort function)
>
> Study  1c
> Study 1b
> Study1a
> Study1d
>
> Is there any way around this difference? Blank spaces should show up
> first in the sort.

Are you in "C" locale or something like "en_US"?  In the latter, the first
is the "correct" ordering.




view thread (18+ messages)  latest in thread

Message-ID: <20030326104353.P63544-100000@megazone23.bigpanda.com>
Permalink:  ../20030326104353.P63544-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030326104353.P63544-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, jkanter@virginia.edu
  Subject: Re: order by
  In-Reply-To: <20030326104353.P63544-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox