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

padding an integer ...

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: padding an integer ...
Date: 2005-10-26 03:57:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Is there any way of "padding" an integer, similar to how, in perl, I would 

printf("%03d", 1);

to get:


Specifically, I'm looking to do this in a pl/pgsql function ... like to 
avoid moving to pl/php or pl/perl if I can ... but, from what I've been 
able to find, I suspect I'm not going to have much of a choice ...

Marc G. Fournier           Hub.Org Networking Services (
Email: scrappy(at)hub(dot)org           Yahoo!: yscrappy              ICQ: 7615664


pgsql-sql by date

Next:From: Marc G. FournierDate: 2005-10-26 03:58:13
Subject: pl/* overhead ...
Previous:From: Tom LaneDate: 2005-10-26 03:53:44
Subject: Re: broken join optimization? (8.0)

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