Re: zerofill: lost my leading zeroes

From: Vincent Stoessel <vincent(at)xaymaca(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: zerofill: lost my leading zeroes
Date: 2002-03-20 20:48:48
Message-ID: 3C98F5B0.3070403@xaymaca.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks, I understand now.

Bruno Wolff III wrote:
> On Wed, Mar 20, 2002 at 01:41:46PM -0500,
> Vincent Stoessel <vincent(at)xaymaca(dot)com> wrote:
>
>>ugh,
>>I created an integer column to hold zip codes and
>>forgot that some US states have zips that start with zeroes.
>>ie 03455 in new England. There is no zerofill option for
>>the integer data type is there?
>
>
> Either you want to store the zip code as a string instead of a number
> or when you print out the number you want to use to_char using a format
> of '00000'.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vincent Stoessel 2002-03-20 20:51:25 Re: bug/feature with upper function?
Previous Message Tom Lane 2002-03-20 20:39:44 Re: no quotes in arrays in 7.2