From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-sql@postgresql.org
Subject: How to get localized to_char(DATE) output
Date: Thu, 06 May 2010 00:26:04 +0200
Message-ID: <hrsr9s$6n7$1@dough.gmane.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: How to get localized to_char(DATE) output
In-Reply-To: <hrsr9s$6n7$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox