pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
To: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Round Numeric Type
Date: Wed, 1 Nov 2006 10:06:17 -0200
Message-ID: <55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com> (raw)
In-Reply-To: <20061031211824.GC20809@phlogiston.dyndns.org>
References: <55c095e90610311135l101f6a91s433e6d7e5b90cb7c@mail.gmail.com>
	<20061031211824.GC20809@phlogiston.dyndns.org>

Numeric(9,2)

2006/10/31, Andrew Sullivan <ajs@crankycanuck.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@crankycanuck.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/

view thread (3+ messages)

Message-ID: <55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com>
Permalink:  ../55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com/
Also on:    postgresql.org/message-id/55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ezequias.rocha@gmail.com, ajs@crankycanuck.ca
  Subject: Re: Round Numeric Type
  In-Reply-To: <55c095e90611010406x258b3d23h2268709e5812b3a7@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox