Re: Best data type to use for sales tax percent

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Best data type to use for sales tax percent
Дата
Msg-id D54071D5-D0F3-4681-999C-A65ECC6F5555@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  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
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%.

--
-- Christophe Pettus
    xof@thebuild.com


В списке pgsql-general по дате отправления:

Предыдущее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: Best data type to use for sales tax percent
Следующее
От: Michal Szymanski
Дата:
Сообщение: Re: transaction ID wraparound - should I use 'VACUUM' or 'VACUUM FULL' ?