How to get localized to_char(DATE) output

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: How to get localized to_char(DATE) output
Date: 2010-05-05 22:26:04
Message-ID: hrsr9s$6n7$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I'm trying to get the output of the to_char(date, text) method in German but I can't get it to work:

My understanding is, that I need to set lc_time for the session in order to change the language used by to_char(), but this does not seem to work for me:

postgres=> select version();
version
-------------------------------------------------------------
PostgreSQL 8.4.3, compiled by Visual C++ build 1400, 32-bit
(1 Zeile)

postgres=> select to_char(current_date, 'Mon');
to_char
---------
May
(1 Zeile)

postgres=> set lc_time = 'German';
SET
postgres=> select to_char(current_date, 'Mon');
to_char
---------
May
(1 Zeile)

postgres=>

Postgres' messages are in German, but not the output of to_char()

After changing lc_time to 'German' I would have expected 'Mai' instead of 'May'

What am I mising?

Regards
Thomas

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2010-05-05 22:51:26 Re: How to get localized to_char(DATE) output
Previous Message Nicholas I 2010-05-05 03:05:27 help