Re: Best data type to use for sales tax percent

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Mike Christensen <mike(at)kitchenpc(dot)com>
Cc: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Best data type to use for sales tax percent
Date: 2009-10-09 10:38:41
Message-ID: 1255084721.7001.7.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2009-10-09 at 00:10 -0700, Mike Christensen wrote:
> Wouldn't (4,3) let me store 0.000 through 9.999? Maybe I'm still not
> following what both numbers mean.

Yes. If you want 0.000 through 0.999, use numeric(3,3). Adding a check
constraint might increase clarity. And put it in a domain for extra
style points. :-)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pedro Doria Meunier 2009-10-09 10:39:47 Posgresql to MSsql encoding problem
Previous Message Alban Hertroys 2009-10-09 09:24:11 Re: How to reduce WAL file Size