Re: Best data type to use for sales tax percent

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: "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-13 15:53:01
Message-ID: 4AD4A25D.3090309@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christophe Pettus wrote:
>
> On Oct 10, 2009, at 3:33 AM, Jasen Betts wrote:
>>> CREATE DOMAN sales_tax_rate AS DECIMAL CHECK (VALUE >= 0 AND VALUE
>>> <=1);
>>
>> why the latter check ( VALUE <=1 )?
>
> Since this version has no scale on the DECIMAL, the second check keeps
> it from being larger than 1.0, since it's presumably a percentage from
> 0% to 99%.
For general-purpose sales-tax...in the United States...for the time being.

I believe the current tax on new vehicles in Israel is 70+% and seem to
recall that it was well over 100% at one time. Sales taxes already vary
by product (in California, food is 0% for example) as well as state,
county, city. I can certainly imagine some locale pushing for taxes well
over 100% on the sin-du-jour (alcohol, tobacco, sugar, fat..)

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2009-10-13 16:48:55 Re: Best data type to use for sales tax percent
Previous Message gmb 2009-10-13 15:01:46 Possible encoding issue (win7)