lexicographical ordering in postgres

From: Paramveer(dot)Singh(at)trilogy(dot)com
To: "pgSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: lexicographical ordering in postgres
Date: 2004-09-16 09:00:43
Message-ID: OF787E552C.DB28019E-ONE5256F11.002D9B31@trilogy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
I created a table in postgres with varchar values in it, and I noticed that
postgres lexicographical ordering is weird in the sense that it ignores
whitespaces.
please look at the result I got:

select * from tablename order by columnname;
cloumnname
-------------------------------------
one 1
one 1
one 12
one 2
one 30
(5 rows)
This means that 'one<space>1' and 'one<space><space>1' are the same
lexicographically.
Is this correct?
thanks
paraM

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ilia Chipitsine 2004-09-16 09:01:23 Re: pg_dump in cycle
Previous Message Rolf stvik 2004-09-16 08:57:43 Re: Spacing in output