to_char bug? - Mailing list pgsql-general

From Ben Trewern
Subject to_char bug?
Date
Msg-id cvnj15$f2p$1@news.hub.org
Whole thread Raw
Responses Re: to_char bug?  (Bricklen Anderson <BAnderson@PresiNET.com>)
Re: to_char bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: GUI
Next
From: "Andrew Hall"
Date:
Subject: Re: Lost rows/data corruption?