length of return value of to_char()

From: Seb <spluque(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: length of return value of to_char()
Date: 2011-05-21 06:00:15
Message-ID: 87liy01tlc.fsf@kolob.subpolar.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I thought this should be equal to 4:

# SELECT length(to_char(11, '0999'));
length
--------
5
(1 row)

but the string returned by the to_char() call is 0011 (length 4). What
am I missing?

Thanks,

--
Seb

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2011-05-21 06:12:13 Re: length of return value of to_char()
Previous Message Wei 2011-05-21 05:05:29 Fwd: Unable to Install - "unable to write inside TEMP environment variable path"