473,378 Members | 1,415 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,378 software developers and data experts.

LC_COLLATE=C not working

I have two Linux servers, one is test and one is production. I run Postgres7.3.3 on both of them. I added a feature to my product that requires sorting like strcmp. So, I did an initdb as follows:

export LC_COLLATE=C
initdb

It fixed the sorting problem.

I have tried to do the same on my production server, and when I do the initdb, it says that LC_COLLATE is C, but it does not sort the same as the testserver. Namely, on the test server 'z' < '~' and on the production server 'z' > '~'.

Both servers have /usr/share/locale/C/cups_C, and they are identical.

Can anyone explain to me how to get Postgres to use LC_COLLATE=C on my production server? I have tried installing Postgres 7.3.3 RPM's for RedHat 7.3 and 8.0 and even tried Postgres 7.3.4 (for 8.0). Everything sorts the same as en_US.iso885915.

Thanks in advance.

Robert

Nov 12 '05 #1
4 5737
Robert Wille writes:
I have tried to do the same on my production server, and when I do the
initdb, it says that LC_COLLATE is C, but it does not sort the same as
the test server. Namely, on the test server 'z' < '~' and on the
production server 'z' > '~'.


You probably still have LC_ALL set to something else. LC_ALL overrides
LC_COLLATE and friends, which in turn override LANG.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2
> Robert Wille writes:
I have tried to do the same on my production server, and when I do the
initdb, it says that LC_COLLATE is C, but it does not sort the same as
the test server. Namely, on the test server 'z' < '~' and on the
production server 'z' > '~'.


You probably still have LC_ALL set to something else. LC_ALL overrides
LC_COLLATE and friends, which in turn override LANG.

--
Peter Eisentraut pe*****@gmx.net

Nope. Any other ideas?

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #3
"Robert Wille" <vm*******@sneakemail.com> writes:
You probably still have LC_ALL set to something else. LC_ALL overrides
LC_COLLATE and friends, which in turn override LANG.
Nope. Any other ideas?


Please use pg_controldata to verify the LC_ settings on both databases.
I suspect they are not really both C.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #4
pg_controldata $PGDATA says LC_COLLATE=C
pg_controldata $PGDATA/data says LC_COLLATE=en_US.iso885915

Perhaps this is a related problem. When I run dbinit, it puts a bunch of
configuration stuff in $PGDATA. When I start the postmaster, it tells me it
is initializing the database and creates $PGDATA/data and puts the same
configuration stuff there. I have no idea why it creates two sets of
configuration data. I don't see this on my test server, just on my
production server. My guess is that when it initializes the database when
the postmaster starts, that it isn't getting the LC_COLLATE setting.

----- Original Message -----
From: "Tom Lane tgl-at-sss.pgh.pa.us |Postgres|"
<xf**********@sneakemail.com>
To: "Robert Wille" <ro*****@willeweb.com>
Cc: "Peter Eisentraut peter_e-at-gmx.net |Postgres|"
<46**********@sneakemail.com>; <pg***********@postgresql.org>
Sent: Friday, October 03, 2003 9:35 AM
Subject: Re: [GENERAL] LC_COLLATE=C not working

"Robert Wille" <vm*******@sneakemail.com> writes:
You probably still have LC_ALL set to something else. LC_ALL overrides
LC_COLLATE and friends, which in turn override LANG.

Nope. Any other ideas?


Please use pg_controldata to verify the LC_ settings on both databases.
I suspect they are not really both C.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gary | last post by:
I am trying to use the "System.Windows.Forms.SendKeys" class for triggering the Ctrl+P key. Syntax: System.Windows.Forms.SendKeys.Send("^(P)"); This is not working ..what could be the...
6
by: Mullin Yu | last post by:
hi, i have a web service that has file operations on Windows OS, and there may be a file concurrency issue if only one working directory e.g. c:\working therefore, i want to have a unique sub...
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
5
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We...
5
by: tshad | last post by:
I have been working with setting my drop boxes to allow double clicking to select an item. It worked fine until I made some changes. I then stripped the page down to the bare essentials to find...
8
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs...
2
by: Don | last post by:
I'm having problems with intellisense, autocomplete, etc. suddenly not working in certain classes of a project I'm working on. All the options are set, and it all works fine for most classes, but...
10
by: John Sidney-Woollett | last post by:
Priem, Alexander said: > I recreated my entire database (luckily I keep scripts for > table/index/view > creation) and initdb-ed it using --lc-collate=C --encoding=UNICODE. In my > psqlODBC DSN...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.