Re: TODO item:Allow to_date() and to_timestamp() accept localized month names

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TODO item:Allow to_date() and to_timestamp() accept localized month names
Дата
Msg-id 11358.1202174957@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TODO item:Allow to_date() and to_timestamp() accept localized month names  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Ответы Re: TODO item:Allow to_date() and to_timestamp() accept localized month names  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: TODO item:Allow to_date() and to_timestamp() accept localized month names  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Список pgsql-hackers
"Gevik Babakhani" <pgdev@xs4all.nl> writes:
>> Surely it should be the inverse of the solution for output, 
>> eg TMMon selects localized input.

> Of cource. But how would TM enforce a localized formatting. (perhaps I am
> off....  2:10 am...)
> Lets say I have en_US database but the dates I am trying to format is nl_NL.
> If I am not mistaking SET LC_MESSAGES won't help.

Works for me:

postgres=# show lc_messages ;lc_messages 
-------------de_DE.utf8
(1 row)

postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');        to_char         
-------------------------Montag, 04 Februar 2008
(1 row)

postgres=# set lc_messages TO 'es_ES.utf8';
SET
postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');       to_char         
------------------------Lunes, 04 Febrero 2008
(1 row)

        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: configure tag'd 8.3.0 and built witih autoconf 2.59
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: configure tag'd 8.3.0 and built witih autoconf 2.59