473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

order by a string

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
3 1933
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christos TZOTZIOY Georgiou | last post by:
Hi all, this post contains at the end a handy module that I've used quite often when I wanted to analyse the occasional complex expression and how it was to be evaluated. The function...
9
by: Steven T. Hatton | last post by:
The following works: template <typename T> struct ID3M{ static const T ID; }; template <typename T> const T ID3M<T>::ID = {{1,0,0},{0,1,0},{0,0,1}};
13
by: Dark Rayden | last post by:
Hi! I recently got a strange problem and I have no idea on the solution. I try to do a ORDER BY statement with a fixed order of values, because my client want's it this way. My approach is...
1
by: jrmsmo | last post by:
Hi there, I have an interesting problem that maybe you pros can suggest how I solve. I'm working with a third party program that serializes an XML document (it was obviously not designed with schema...
1
by: Daniel Lidström | last post by:
Hello, how can I control the order of which elements are serialized. For example, my class looks like: public __gc class Author { public: Author(); // get/set methods
7
by: Luigi Napolitano | last post by:
Hello, I use this algorithm to sort an array "v" in the descending order. void quickSort(float v, int lo0, int hi0) { int lo = lo0; int hi = hi0; if (lo >= hi) return; float mid = v;
0
by: David Laub | last post by:
When I bind a collection to a DataGrid (with teh single statement DataBind), I love that the property names become the column names/values for the grid. But I HATE that the columns are (seemingly?)...
8
by: jamie | last post by:
Here's a class I'm working with public class BatchHeader { public string ScaleSite; public string FromScaleDate;
16
by: mdh | last post by:
May I ask the group the following: (Again, alas , from K&R) This is part of a function: while ( ( array1 = array2 ) != '\0' ); /* etc etc */ Is this the order that this is evaluated? ...
2
yue219
by: yue219 | last post by:
Language is C++. I dont know how to take what the user orders and calculate their bill. I used a class. Heres my code: #include <iostream> #include <string> #include "Headerfile.h" using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.