a_dur...@hotmail.com writes: > prod=# SELECT TO_CHAR('2013-03-01'::date,'DAY'); > to_char > ---------- > FRİDAY > (1 row) > But it must return as FRIDAY. > Our database lc_collate is tr_TR.UTF-8 and encoding is UTF8.
It looks like the cause of this is that the result is computed as str_toupper("Friday"), and str_toupper() applies a collation-sensitive upcasing rule. I think the use of str_toupper() is appropriate when processing the locale-specific string for a TMDAY specification; but plain DAY is not supposed to be locale-dependent, so we probably should use an ASCII-only upcasing rule in the non-TM code path. Anybody have an opinion on whether to back-patch such a fix? It seems conceivable that somebody out there is relying on the current behavior. OTOH, I believe that only Turkish UTF8 locales exhibit this behavior (the single-byte-encoding code path in str_toupper acts differently for historical reasons). So it's pretty inconsistent as it stands. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs