[BUGS] order by question.
I'm using version 7.3 of postgres and when I issue the following command select author, sort_author from itemsbyauthor where sort_author like 'tan%'; I get the following results: Author sort_author Tan, Weihong| tan, weihong Tang, S. C. | tang, s. c. Tan, Fang | tan, fang Note how the tan's are not grouped together when I think they should be. Is this something that is fixed in a more current version of postgres? Thank you!
Re: [BUGS] order by question.
I'll try this question again. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jose Blanco Sent: Thursday, May 03, 2007 4:12 PM To: pgsql-bugs@postgresql.org Subject: [BUGS] order by question. I'm using version 7.3 of postgres and when I issue the following command select author, sort_author from itemsbyauthor where sort_author like 'tan%'; I get the following results: Author sort_author Tan, Weihong| tan, weihong Tang, S. C. | tang, s. c. Tan, Fang | tan, fang Note how the tan's are not grouped together when I think they should be. Is this something that is fixed in a more current version of postgres? Thank you!
Re: [BUGS] order by question.
This second time I did, see select author, sort_author from itemsbyauthor where sort_author like 'tan%' order by 2; "order by 2" Or am I not understanding something? Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Friday, May 04, 2007 2:24 PM To: Jose Blanco Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] order by question. "Jose Blanco" <[EMAIL PROTECTED]> writes: > I'll try this question again. The answer is the same as before: you didn't specify an ORDER BY clause, therefore there is no reason to expect any particular output ordering. Whatever ordering you might happen to see is an implementation artifact. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [BUGS] order by question.
I'm not sure what you mean by "C" and how do I change this? -Original Message- From: Stephan Szabo [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 3:38 PM To: Jose Blanco Cc: 'Tom Lane'; pgsql-bugs@postgresql.org Subject: Re: [BUGS] order by question. On Fri, 4 May 2007, Jose Blanco wrote: > This second time I did, see > > select author, sort_author from itemsbyauthor where sort_author like 'tan%' > order by 2; > > > "order by 2" > > Or am I not understanding something? One issue you might not realize is that the sort order for some locales ignore symbols and spaces for initial scans, so for example, you might find that "A Z" > "AB" while " " < "B". Specifically, for the data you gave, en_US would order them "tan, fang", "tang, s. c.", "tan, weihong" while C would order them "tan, fang", "tan, weihong", "tang, s. c.". ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly