473,509 Members | 3,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1937
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
1716
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
2720
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
12123
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
1756
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
1656
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
3734
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
1186
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
2451
by: jamie | last post by:
Here's a class I'm working with public class BatchHeader { public string ScaleSite; public string FromScaleDate;
16
2425
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
1410
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
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
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
7505
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
5652
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,...
1
5060
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...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.