Re: Round Numeric Type

From: "Ezequias Rodrigues da Rocha" <ezequias(dot)rocha(at)gmail(dot)com>
To: "Andrew Sullivan" <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Round Numeric Type
Date: 2006-11-01 12:06:17
Message-ID: 55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Numeric(9,2)

2006/10/31, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>:
>
> On Tue, Oct 31, 2006 at 05:35:17PM -0200, Ezequias Rodrigues da Rocha
> wrote:
> > Hi list,
> >
> > I did a trigger to update a points on a table but in some cases the
> > PostgreSQL does a round of my Numeric like.
> >
> > If >= 0.5 so postgresql puts 1
> > If < 0.5 so postgresql puts 0
> >
> > Did anybody knows if it is possible to control this matter ?
>
> Sounds like your datatype doesn't match your input, and that you've
> got a type that rounds. What's the datatype you're putting into?
>
> A
>
> --
> Andrew Sullivan | ajs(at)crankycanuck(dot)ca
> Users never remark, "Wow, this software may be buggy and hard
> to use, but at least there is a lot of code underneath."
> --Damien Katz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Sullivan 2006-11-01 14:28:33 Re: record datatype comparisons
Previous Message roopa perumalraja 2006-11-01 06:49:15 Re: Add calculated fields from one table to other table