On 10/26/12 11:50, Samuel Gilbert wrote:
> 
>    (SELECT to_char(42, '000000000') AS string) AS example;
> 
>    string   | length | showthemtome 
> ------------+--------+--------------
>   000000042 |     10 | " 000000042"

Sign padding.  Try using:
   select to_char(42, 'FM000000000') ...

To see why, look here:
http://www.postgresql.org/docs/9.2/static/functions-formatting.html#FUNCTIONS-FORMATTING-NUMERICMOD-TABLE

HTH

Bosco.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to