Skip site navigation (1) Skip section navigation (2)

Re: Missing Bug-Report #5904?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Torsten Zühlsdorff <foo(at)meisterderspiele(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Missing Bug-Report #5904?
Date: 2011-03-08 15:02:10
Message-ID: 8846.1299596530@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
=?ISO-8859-15?Q?Torsten_Z=FChlsdorff?= <foo(at)meisterderspiele(dot)de> writes:
>>> # SET lc_time = "de_DE.UTF-8";
>>> # SELECT to_char('2011-03-04 00:00:01'::date, 'TMMonth YYYY');
>>> to_char
>>> -----------
>>> MRz 2011

>> I can reproduce the above when the database encoding is not UTF8 or
>> lc_ctype isn't a UTF8 locale.

> Hm... encoding of the database is UTF8. The lc_ctype is 'C'.

Right, that was the same case I checked.  In C locale,  is not a
letter, so you get the above from the initcap transformation.

> But don't that mean, that the translation of the timestamp to languages 
> with other umlauts should also be wrong. For example to "fr_FR.UTF-8"?

Possibly, I haven't checked.  If they have any month names with
non-ASCII characters in the middle, they'd see the same thing.
You would certainly also get undesirable results from TMMONTH, since
it wouldn't know how to uppercase .  In my view none of this is
a Postgres bug --- the correct fix is to use locale settings that
correspond to the behavior you want.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Torsten ZühlsdorffDate: 2011-03-08 15:24:23
Subject: Re: Missing Bug-Report #5904?
Previous:From: Dan PortsDate: 2011-03-08 14:35:43
Subject: Re: BUG #5918: SummarizeOldestCommittedSxact assertion failure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group