Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group