to_char(0,'9999.99') -> ".00"

From: Phil Endecott <spam_from_postgresql_general(at)chezphil(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: to_char(0,'9999.99') -> ".00"
Date: 2005-01-10 22:48:21
Message-ID: 41E30635.7070106@chezphil.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All,

I was a bit surprised to find that

to_char(0,'9999.99')

returns .00 rather than 0.00.

Is this a bug or a feature? How do I get what I want?

(This is with 7.4.2. Appologies if it is a known problem. The search
form in the list archives seems to split words on _, so looking for
to_char finds lots of pages that just say 'char'.)

Regards,

Phil Endecott.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Aaron Steele 2005-01-10 22:52:46 warning: pg_query(): Query failed
Previous Message Chris 2005-01-10 22:40:46 Limiting USAGE to only certain objects within a schema