pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rolf.ostvik@axxessit.no
To: pgsql-sql@postgresql.org
Subject: Re: to_char adds leading space, intended?
Date: Thu, 3 Jan 2002 08:39:40 +0100
Message-ID: <OF36E25CE3.8C3DF18B-ONC1256B36.00291D75@axxessit.no> (raw)


On 2002-01-03 "Aasmund Midttun Godal" <postgresql@envisity.com> wrote:
>envisity=# SELECT '''' || to_char(1234, '099999') || '''';

> ?column?
>-----------
> ' 001234'
>(1 row)

Modifier "FM" in the format string is your friend
     SELECT '''' || to_char(1234, 'FM099999') || '''';
                                    ^^

Table 4.11 on
     http://www.postgresql.org/idocs/index.php?functions-formatting.html
--
AXXESSIT ASA                  http://www.axxessit.no
Rolf Østvik / Test technician
Phone : (+47) 69 17 38 19     Fax: (+47) 69 17 39 00
P.O. Box 1053, Isebakkevn. 25, N-1787 Berg i Østfold





view thread (2+ messages)

Message-ID: <OF36E25CE3.8C3DF18B-ONC1256B36.00291D75@axxessit.no>
Permalink:  ../OF36E25CE3.8C3DF18B-ONC1256B36.00291D75@axxessit.no/
Also on:    postgresql.org/message-id/OF36E25CE3.8C3DF18B-ONC1256B36.00291D75@axxessit.no

 · 

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: rolf.ostvik@axxessit.no
  Subject: Re: to_char adds leading space, intended?
  In-Reply-To: <OF36E25CE3.8C3DF18B-ONC1256B36.00291D75@axxessit.no>

* 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