From: | Euler Taveira de Oliveira <euler(at)timbira(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: lc_time and localized dates |
Date: | 2008-02-26 23:18:10 |
Message-ID: | 47C49E32.2080700@timbira.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Tom Lane wrote:
> But as Peter remarks nearby, this discussion is wasted anyway, because
> there is only one correct answer: whatever Oracle does with these
> cases is what to_char() should do.
>
My patch does exactly what Oracle does besides one thing: my code does
not contain a real capitalization function. It sucks when we have
composite names like the portuguese above. I'll post an updated version
later.
SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon
mon', 'NLS_DATE_LANGUAGE = czech') FROM dual;
TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DAT
-----------------------------------------------------------
UT ut UTERY Utery utery UNOR Unor UNO Uno uno
SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon
mon', 'NLS_DATE_LANGUAGE = dutch') FROM dual;
TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DATE_LANGUA
-------------------------------------------------------------------
DI di DINSDAG Dinsdag dinsdag FEBRUARI Februari FEB Feb feb
SQL> SELECT TO_CHAR(SYSDATE, 'DY dy DAY Day day MONTH Month MON Mon
mon', 'NLS_DATE_LANGUAGE = portuguese') FROM dual;
TO_CHAR(SYSDATE,'DYDYDAYDAYDAYMONTHMONTHMONMONMON','NLS_DATE_LANGUAGE=PORTUGUESE'
---------------------------------------------------------------------------------
TER ter TERCA-FEIRA Terca-Feira terca-feira FEVEREIRO Fevereiro
FEV Fev fev
--
Euler Taveira de Oliveira
http://www.timbira.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-02-27 12:33:30 | Re: Fix for initdb failures on Vista |
Previous Message | Simon Riggs | 2008-02-26 21:36:36 | Re: Bulk Insert tuning |