Re: weird duplicate data problem

From: Jan Wieck <janwieck(at)yahoo(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Jeff Self <jocknerd(at)home(dot)com>, Carolyn Lu Wong <carolyn(at)greatpacific(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org
Subject: Re: weird duplicate data problem
Date: 2001-12-14 20:54:09
Message-ID: 200112142054.fBEKs9e03436@saturn.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Josh Berkus wrote:
> Carolyn, Jeff,
>
> I have to disagree with this, Jeff. A six-digit integer takes up only
> 20% of the storage space of a 6-character string. As such, it will be
> faster to index and faster to retrieve, and faster to perform JOINs and
> sorts. So if Carolyn will never want to store anything but numbers in
> the field, integer is ideal.

That is all true, and still you should not restrict the
possible content to something that got nothing to do with the
nature of the data.

Things like account numbers, zip codes, phone numbers,
whatnot ARE CHARACTER SEQUENCES - period. How sure can
Carolyn be that there will never be an account number where
leading zeroes are significant? That true already for zip
codes (and by the way, european zipcodes are alphanumeric).

And what is the cosmic significance of my phone number plus
your creditcard number divided by Carolyn's shoesize? :-)

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Oleg Lebedev 2001-12-15 02:28:20 won't drop the view
Previous Message Josh Berkus 2001-12-14 19:22:30 Re: weird duplicate data problem