From: | Steve Clark <sclark(at)netwolves(dot)com> |
---|---|
To: | pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | order by question |
Date: | 2014-08-07 15:17:17 |
Message-ID: | 53E3987D.7080103@netwolves.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I am confused by how postgres 8,4..13 is sorting my data.
\d test
Table "public.test"
Column | Type | Modifiers
--------+------+-----------
data | text |
select * from test order by data;
data
----------
-
--
1
11
11F
1F
a
b
C
F
-F
Feneric
Generic
(14 rows)
The first row is a single space, the next row a single -, the next two -- .
What I don't understand is why the '-F', the ' Feneric' and the ' Generic' sort where they do.
I would expect the output to be like this:
data
----------
Feneric
Generic
-
--
-F
1
11
11F
1F
a
b
C
F
(14 rows)
client_encoding
-----------------
SQL_ASCII
lc_collate
-------------
en_US.UTF-8
foxboxconfig=# show lc_ctype;
lc_ctype
-------------
en_US.UTF-8
Thanks for any clarification.
--
Stephen Clark
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-08-07 15:17:47 | Re: Adding 3 hours while inserting data into table |
Previous Message | Gaurav Tiwari G | 2014-08-07 15:09:21 | Re: Adding 3 hours while inserting data into table |