Re: Best data type to use for sales tax percent

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
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 18:36:30
Message-ID: 7aa638e00910091136o4c3fea0fifddd87b81ce7e141@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Can you explain what you mean by "put it in a domain" - I'd love extra
style points, but this sounds like a feature I haven't learned about
yet.

On Fri, Oct 9, 2009 at 3:38 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> 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 Christophe Pettus 2009-10-09 18:46:22 Re: Best data type to use for sales tax percent
Previous Message Mike Christensen 2009-10-09 18:35:13 Re: Best data type to use for sales tax percent