pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Formatting zeroes
Date: Tue, 17 Sep 2002 01:33:26 -0400 (EDT)
Message-ID: <200209170533.g8H5XQq29077@candle.pha.pa.us> (raw)
In-Reply-To: <web-1649734@davinci.ethosmedia.com>

Josh Berkus wrote:
> Ludwig,
> 
> >   I'm trying to use SQL to generate a formatted
> > report. The "to_char(numeric,'FM9,999,999,999.99')"
> > function works when I use it format numbers with
> > decimal points and appropriate commas.
> >   Is there a format specifier in the to_char function
> > that it will display 0 as "0" or "0.0"?
> 
> "to_char(numeric,'FM9,999,999,999.09')"

And we know it is a bug:

  * to_char(0,'FM999.99') returns a period, to_char(1,'FM999.99') does not

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (3+ messages)

Message-ID: <200209170533.g8H5XQq29077@candle.pha.pa.us>
Permalink:  ../200209170533.g8H5XQq29077@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200209170533.g8H5XQq29077@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, josh@agliodbs.com, lud_nowhere_man@yahoo.com
  Subject: Re: Formatting zeroes
  In-Reply-To: <200209170533.g8H5XQq29077@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox