From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | jhondius(at)rem(dot)nl |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: lc_time not working? |
Date: | 2013-01-07 15:13:19 |
Message-ID: | 50EAE60F.4070100@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 01/07/2013 06:45 AM, J. Hondius wrote:
> Hi All,
> please advise
>
> I'm not getting my PostgreSQL 9.2 to return the correct lc_time
> See psql output below.
> lc_monetary and the lc's do work correctly
>
> postgresql.conf is set to lc_time = 'nl_NL'
> the output of locale -a includes nl_NL
>
> [root(at)d01 ~]# psql db user
> psql (9.2.1)
> Type "help" for help.
>
> openwave001=# select set_config('lc_time', 'nl_NL', true);
> set_config
> ------------
> nl_NL
> (1 row)
When you use true it only applies for that transaction.
Example:
test=# select set_config('lc_time', 'nl_NL', True);
set_config
------------
nl_NL
(1 row)
test=# SELECT current_setting('lc_time');
current_setting
-----------------
en_US.UTF-8
(1 row)
When you false it sticks for the session:
test=# select set_config('lc_time', 'nl_NL', False);
set_config
------------
nl_NL
(1 row)
test=# SELECT current_setting('lc_time');
current_setting
-----------------
nl_NL
>
> openwave001=# select to_char(now(),'dd month day yyyy');
> to_char
> -----------------------------
> 07 january monday 2013
> (1 row)
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-01-07 15:56:26 | Re: lc_time not working? |
Previous Message | J. Hondius | 2013-01-07 14:45:25 | lc_time not working? |