Re: [GENERAL] setting the environment locale - linux, windows

2006-04-21 Thread Martijn van Oosterhout
On Fri, Apr 21, 2006 at 12:49:31AM +0200, Tomi NA wrote:
 This is probably somewhat offtopic, but it does relate to postgresql so...
 Problem summary: I have a UTF-8 encoded database running on linux on
 which upper() and lower() string functions ignore locale specific
 characters.

You need to look at your LC_COLLATE settings. LC_COLLATE and LC_CTYPE
are fixed at initdb and constant across the DB.

 Are there plans to enable assigning locale at the database level?

Plans, yes. Progress, a bit slow...

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] setting the environment locale - linux, windows

2006-04-21 Thread Tomi NA
On 4/21/06, Martijn van Oosterhout kleptog@svana.org wrote:
 On Fri, Apr 21, 2006 at 12:49:31AM +0200, Tomi NA wrote:
  This is probably somewhat offtopic, but it does relate to postgresql so...
  Problem summary: I have a UTF-8 encoded database running on linux on
  which upper() and lower() string functions ignore locale specific
  characters.

 You need to look at your LC_COLLATE settings. LC_COLLATE and LC_CTYPE
 are fixed at initdb and constant across the DB.

So, if I were to backup my database, clear the data directory,
reinitialize the cluster and restore the database using the correct
LC_COLLATE and LC_CTYPE, I'd have one language nailed?

  Are there plans to enable assigning locale at the database level?

 Plans, yes. Progress, a bit slow...

No estimates, then?
Nevertheless, thanks for the help.

Tomislav

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

   http://archives.postgresql.org


Re: [GENERAL] setting the environment locale - linux, windows

2006-04-21 Thread Martijn van Oosterhout
On Fri, Apr 21, 2006 at 03:34:27PM +0200, Tomi NA wrote:
 On 4/21/06, Martijn van Oosterhout kleptog@svana.org wrote:
  You need to look at your LC_COLLATE settings. LC_COLLATE and LC_CTYPE
  are fixed at initdb and constant across the DB.
 
 So, if I were to backup my database, clear the data directory,
 reinitialize the cluster and restore the database using the correct
 LC_COLLATE and LC_CTYPE, I'd have one language nailed?

Well, you need the reinitialise the cluster with the correct language.
Once initiailised it doesn't matter what you restore with.

   Are there plans to enable assigning locale at the database level?
 
  Plans, yes. Progress, a bit slow...
 
 No estimates, then?
 Nevertheless, thanks for the help.

Well, I'm worked on COLLATE support which would get it down to the
column level. This is pretty much what you need, since indexes could be
shared between databases and each database needs the same definition
for those indexes.

I'm got a fair way but got a little over my head, so unless someone
picks it up and completes it, it could be a while...

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] setting the environment locale - linux, windows

2006-04-21 Thread Tomi NA
On 4/21/06, Martijn van Oosterhout kleptog@svana.org wrote:
 On Fri, Apr 21, 2006 at 03:34:27PM +0200, Tomi NA wrote:
  On 4/21/06, Martijn van Oosterhout kleptog@svana.org wrote:
   You need to look at your LC_COLLATE settings. LC_COLLATE and LC_CTYPE
   are fixed at initdb and constant across the DB.
 
  So, if I were to backup my database, clear the data directory,
  reinitialize the cluster and restore the database using the correct
  LC_COLLATE and LC_CTYPE, I'd have one language nailed?

 Well, you need the reinitialise the cluster with the correct language.
 Once initiailised it doesn't matter what you restore with.

Are there plans to enable assigning locale at the database level?
  
   Plans, yes. Progress, a bit slow...
 
  No estimates, then?
  Nevertheless, thanks for the help.

 Well, I'm worked on COLLATE support which would get it down to the
 column level. This is pretty much what you need, since indexes could be
 shared between databases and each database needs the same definition
 for those indexes.

 I'm got a fair way but got a little over my head, so unless someone
 picks it up and completes it, it could be a while...

I'd be more than happy to lend a hand if I had a 9 to 5 job...*if* I
had a 9 to 5 job. A man can dream... :-\

t.n.a.

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

   http://archives.postgresql.org


[GENERAL] setting the environment locale - linux, windows

2006-04-20 Thread Tomi NA
This is probably somewhat offtopic, but it does relate to postgresql so...
Problem summary: I have a UTF-8 encoded database running on linux on
which upper() and lower() string functions ignore locale specific
characters.
To make things a bit more interesting, the development machines
(including the db server) are linux based, while the target servers
are a mixture of linux and windows servers.

I need to compare strings case insensitive. Proper collation would be
a plus, but I could live without it for the time beeing.
How does one set the e.g. german locale in linux? Or in windows? Is it
given as a parameter of initdb and frozen aftewards or does the
postmaster look to it's environment for this information (LC_ALL,
LC_CTYPE variables)?
Are there plans to enable assigning locale at the database level?

Tomislav

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq