to_char bug?

From: "Ben Trewern" <bendottrewern(at)mowlem(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: to_char bug?
Date: 2005-02-25 16:19:37
Message-ID: cvnj15$f2p$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there any reason why :

SELECT char_length(to_char(1, '000'));

Gives a result

char_length
-------------
4
(1 row)

It seems that to_char(1, '000') gives a string " 001" with a space in front.
Is this a bug?

Regards,

Ben

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Smith 2005-02-25 16:31:57 LIke and Indicies
Previous Message Bruce Momjian 2005-02-25 16:16:33 Re: Possible to run the server with ANSI/ISO string escapeing