Re: Best data type to use for sales tax percent

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: "pgsql-general(at)postgresql(dot)org mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Best data type to use for sales tax percent
Date: 2009-10-08 22:39:47
Message-ID: 1BB5F376-C6A5-419B-A87F-2F3BF15258AA@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Oct 8, 2009, at 3:04 PM, Mike Christensen wrote:
> I'm guessing numeric(2,3) should
> be fine, yes?

Numeric is definitely what you want. You probably want at least four
fractional digits, since sales tax (at least in California) is
routinely set to a quarter of a point. For example, the basic sales
tax rate in Los Angeles is 9.75%, so 0.0975. (There are other
subtleties in sales tax calculation in California; feel free to ask
off-list if you want more utterly non-PostgreSQL-related detail. :) )

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-10-08 23:38:28 Re: Best data type to use for sales tax percent
Previous Message Steve Crawford 2009-10-08 22:36:45 Re: Best data type to use for sales tax percent