Change in behaviour of ORDER BY clause in PG7.3
Since upgrading to 7.3 I've noticed that the ORDER BY clause seems to
ignore leading spaces/punctuation for eg we have a simple table with 6
rows containing:
'a'
'b'
'c'
'd'
' bill'
'-bill'
SELECT * FROM table ORDER BY 1;
gives:
a
b
bill
-bill
c
d
which is different from previous versions and different to MySQL and SQL
Server. Is this a bug, or can you turn this behaviour off? It's breaking a
lot of our applications!
--
Ollie Clark - oliverc@comp.leeds.ac.uk - ol@ollieclark.com
http://www.ollieclark.com/acronyms.html
Ollie Clark writes:
Since upgrading to 7.3 I've noticed that the ORDER BY clause seems to
ignore leading spaces/punctuation for eg we have a simple table with 6
rows containing:
You need to set the right locale. You appear to expect the "C" locale, so
you need to tell initdb about it.
--
Peter Eisentraut peter_e@gmx.net
"Ollie Clark <oliverc@comp.leeds.ac.uk>" wrote in
comp.databases.postgresql.hackers:
[sNip]
which is different from previous versions and different to MySQL and SQL
Server. Is this a bug, or can you turn this behaviour off? It's breaking
a lot of our applications!
Could you clarify which vendor's SQL Server you're referring to? Or do
you mean a subset of MySQL or PostgreSQL?
--
Sir Randolf, noble spam fighter - rr@8x.ca
Vancouver, British Columbia, Canada
Please do not eMail me directly when responding
to my postings in the newsgroups.