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


Thu, 20 Nov 2003 11:43:53 GMT
Ollie Clark <oliverc@comp.leeds.ac.uk>
Change in behaviour of ORDER BY clause in PG7.3
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


Fri, 28 Nov 2003 22:09:13 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: Change in behaviour of ORDER BY clause in PG7.3
"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.

Tue, 30 Dec 2003 23:28:38 +0000 (UTC)
Randolf Richardson <rr@8x.ca>
Re: Change in behaviour of ORDER BY clause in PG7.3