By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,178 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,178 IT Pros & Developers. It's quick & easy.

order by a string

P: n/a
hi!

i am developing with version 7.3.2 under cygwin. my production
evironment is 7.3.3 on a suse machine.
language settings (lc_...) for the server are on developing and
production machine the same, 'C'.
now i encoutered the following behaviour. i use a union select to unify
a query result with an ' (all)' entry.
i used at home a space on first character to ensure this entry will be
on top if i am ordering by the column.
it works in developing environment but it doesnt in production. in
production i got a ordering result wich ignores special chars like my
whitespace and the '(' and the all entry so comes for example after
'akk' and before 'amm'.
i dont want to have it this way!
did i miss any setting option to change this behaviour?
or do i need something like a workaround (adding another column, for
axample adding values like 0 for my special entrys and 1 for all others
so i can sort by this solumn too, to get my result?)

thanx for your help
stefan
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Stefan Leitich writes:
i am developing with version 7.3.2 under cygwin. my production
evironment is 7.3.3 on a suse machine.
language settings (lc_...) for the server are on developing and
production machine the same, 'C'.
now i encoutered the following behaviour. i use a union select to unify
a query result with an ' (all)' entry.
i used at home a space on first character to ensure this entry will be
on top if i am ordering by the column.
it works in developing environment but it doesnt in production. in
production i got a ordering result wich ignores special chars like my
whitespace and the '(' and the all entry so comes for example after
'akk' and before 'amm'.


That is a pretty clear indication that the locale on the production
machine is not, in fact, C. Note that the locale is set when the cluster
is initialized, so you may need to re-initdb.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #2

P: n/a
so the only way i come around this problem is dump my db. drop the db.
and do a initdb with the right settings and run my dump on the new one?
how can i figure out which locale is set on the suse machine (i am a
linux novice, sorry)?
which locale i should set on the suse machine for use in a german
language environment, and how do i do it?
thanx for your help!
stefan

Peter Eisentraut wrote:
Stefan Leitich writes:
i am developing with version 7.3.2 under cygwin. my production
evironment is 7.3.3 on a suse machine.
language settings (lc_...) for the server are on developing and
production machine the same, 'C'.
now i encoutered the following behaviour. i use a union select to unify
a query result with an ' (all)' entry.
i used at home a space on first character to ensure this entry will be
on top if i am ordering by the column.
it works in developing environment but it doesnt in production. in
production i got a ordering result wich ignores special chars like my
whitespace and the '(' and the all entry so comes for example after
'akk' and before 'amm'.


That is a pretty clear indication that the locale on the production
machine is not, in fact, C. Note that the locale is set when the cluster
is initialized, so you may need to re-initdb.

Nov 12 '05 #3

P: n/a
so the only way i come around this problem is dump my db. drop the db.
and do a initdb with the right settings and run my dump on the new one?
how can i figure out which locale is set on the suse machine (i am a
linux novice, sorry)?
which locale i should set on the suse machine for use in a german
language environment, and how do i do it?
thanx for your help!
stefan

Peter Eisentraut wrote:
Stefan Leitich writes:
i am developing with version 7.3.2 under cygwin. my production
evironment is 7.3.3 on a suse machine.
language settings (lc_...) for the server are on developing and
production machine the same, 'C'.
now i encoutered the following behaviour. i use a union select to unify
a query result with an ' (all)' entry.
i used at home a space on first character to ensure this entry will be
on top if i am ordering by the column.
it works in developing environment but it doesnt in production. in
production i got a ordering result wich ignores special chars like my
whitespace and the '(' and the all entry so comes for example after
'akk' and before 'amm'.


That is a pretty clear indication that the locale on the production
machine is not, in fact, C. Note that the locale is set when the cluster
is initialized, so you may need to re-initdb.

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.