Unix Technical Forum

TM modificator don't work? to_char

This is a discussion on TM modificator don't work? to_char within the pgsql Hackers forums, part of the PostgreSQL category; --> Hello, I try 8.2 features. I tested to_char from doc, but without success. postgres=# select to_char(now(), 'TMDay, DD TMMonth ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 05:01 AM
Pavel Stehule
 
Posts: n/a
Default TM modificator don't work? to_char

Hello,

I try 8.2 features. I tested to_char from doc, but without success.

postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');
to_char
-----------------------------
Thursday, 28 September 2006
(1 row)

I expected translated names :-(. What can be wrong.

lc_collate | cs_CZ.UTF-8 |
Shows the collation order locale.
lc_ctype | cs_CZ.UTF-8 |
Shows the character classification and case conversion locale.
lc_messages | cs_CZ.UTF-8 |
Sets the language in which messages are displayed.
lc_monetary | cs_CZ.UTF-8 |
Sets the locale for formatting monetary amounts.
lc_numeric | cs_CZ.UTF-8 |
Sets the locale for formatting numbers.
lc_time | cs_CZ.UTF-8

Regards

Pavel Stehule

__________________________________________________ _______________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 05:05 AM
Bruce Momjian
 
Posts: n/a
Default Re: TM modificator don't work? to_char


Can someone confirm this features works or fails?

---------------------------------------------------------------------------

Pavel Stehule wrote:
> Hello,
>
> I try 8.2 features. I tested to_char from doc, but without success.
>
> postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');
> to_char
> -----------------------------
> Thursday, 28 September 2006
> (1 row)
>
> I expected translated names :-(. What can be wrong.
>
> lc_collate | cs_CZ.UTF-8 |
> Shows the collation order locale.
> lc_ctype | cs_CZ.UTF-8 |
> Shows the character classification and case conversion locale.
> lc_messages | cs_CZ.UTF-8 |
> Sets the language in which messages are displayed.
> lc_monetary | cs_CZ.UTF-8 |
> Sets the locale for formatting monetary amounts.
> lc_numeric | cs_CZ.UTF-8 |
> Sets the locale for formatting numbers.
> lc_time | cs_CZ.UTF-8
>
> Regards
>
> Pavel Stehule
>
> __________________________________________________ _______________
> Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org


--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 05:05 AM
Sergey E. Koposov
 
Posts: n/a
Default Re: TM modificator don't work? to_char

On Mon, 2 Oct 2006, Bruce Momjian wrote:

>
> Can someone confirm this features works or fails?



As I see from the original commit:
http://groups.google.com/group/pgsql...4d49 5ec7ecf8
http://developer.postgresql.org/cvsw...1.103&r2=1.104

the patch for to_char wasn't written at all for looking into the locale
settings... It "uses" gettext() to "localize" the output of to_char()
which seems to be pretty useless behaviour...

Regards,
Sergey
************************************************** *****************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 05:05 AM
Tom Lane
 
Posts: n/a
Default Re: TM modificator don't work? to_char

Bruce Momjian <bruce@momjian.us> writes:
> Can someone confirm this features works or fails?


It works if you have NLS translations for "Thursday", "September",
etc ... which none of the backend .po files do yet.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 05:05 AM
Bruce Momjian
 
Posts: n/a
Default Re: TM modificator don't work? to_char

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Can someone confirm this features works or fails?

>
> It works if you have NLS translations for "Thursday", "September",
> etc ... which none of the backend .po files do yet.


But they will when we have the po files updated for this release, I
suppose.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-12-2008, 05:05 AM
Tom Lane
 
Posts: n/a
Default Re: TM modificator don't work? to_char

Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> It works if you have NLS translations for "Thursday", "September",
>> etc ... which none of the backend .po files do yet.


> But they will when we have the po files updated for this release, I
> suppose.


We should probably list translation updates as one of the open items
for the release.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-12-2008, 05:05 AM
Bruce Momjian
 
Posts: n/a
Default Re: TM modificator don't work? to_char

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Tom Lane wrote:
> >> It works if you have NLS translations for "Thursday", "September",
> >> etc ... which none of the backend .po files do yet.

>
> > But they will when we have the po files updated for this release, I
> > suppose.

>
> We should probably list translation updates as one of the open items
> for the release.


Added.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com