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/

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to