I am suffering some sort order confusion. Given a database, "foo",
with a single character(4) column of data left padded with spaces I
get:
select * from foo order by somechars;
somechars
-----------
0
1
10
100
1011
111
1512
2
222
3
333
The output I desire is a basic ASCII sort:
somechars
-----------
0
1
2
3
10
100
111
222
333
1011
1512
(This sample set just has spaces and numeric digits but could have
other characters - I want the output in ASCII sort order)
1. What is the correct way to do this?
2. How do I verify the locale setting of an existing database cluster
(to verify that I really initialized it as "initdb -d --locale=C -D
/var/lib/pgsql/data")?
3. Should I have included "--enable-locale" or similar option when I
built Postgresql (the build is vanilla 7.4.1 "./configure ; make ;
make install")?
Cheers,
Steve
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)