problem with to_char - Mailing list pgsql-general

From Carsten Grewe
Subject problem with to_char
Date
Msg-id 200201290845.g0T8j9l91001@postgresql.org
Whole thread Raw
List pgsql-general
Hi!

I think I have not understood some elementary things of the to_char function
in pgsql7.1.2. I only get back a mask instead of a formatted string.

I tried the following in psql:
SPS=> select to_char(45145, '9.999,99');
  to_char
-----------
  #.###,##
(1 row)

I also tried a "normal" query in the form:
    select col1,col2,to_char(col3, '9.999,99') from test;
with col3 as numeric values. I also only get a mask in the 3rd col.

What am I doing wrongly?

Kind regards,
Carsten Grewe

pgsql-general by date:

Previous
From: Dmitry Alyabyev
Date:
Subject: Re: password file for crypt authentication fails
Next
From: Karl DeBisschop
Date:
Subject: Re: Pg_dump options