Re: Best data type to use for sales tax percent

Поиск
Список
Период
Сортировка
Искать
От
Christophe Pettus
Тема
Re: Best data type to use for sales tax percent
Дата
Msg-id
1BB5F376-C6A5-419B-A87F-2F3BF15258AA@thebuild.com
Ответ на
Список
Дерево обсуждения
Re: Best data type to use for sales tax percent Jasen Betts <jasen@xnet.co.nz>
Re: Best data type to use for sales tax percent "Roderick A. Anderson" <raanders@cyber-office.net>
Re: Best data type to use for sales tax percent Christophe Pettus <xof@thebuild.com>
Re: Best data type to use for sales tax percent Steve Crawford <scrawford@pinpointresearch.com>
Re: Best data type to use for sales tax percent Peter Geoghegan <peter.geoghegan86@gmail.com>

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@thebuild.com

В списке pgsql-general по дате отправления
От: Steve Crawford
Дата:
От: Merlin Moncure
Дата:
FAQ