Search Postgresql Archives

Re: Trigger Function and backup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 15, 2009 at 5:50 AM, Havasvölgyi
Ottó<havasvolgyi.otto@xxxxxxxxx> wrote:
> Hi,
>
> I have found the following strangeness on Windows:
>
> create table round_test (id int primary key, value double precision);
> insert into round_test(id, value) values(1, 1.5);
> insert into round_test(id, value) values(2, -1.5);
> insert into round_test(id, value) values(3, 3.5);


Firstly, I'm not sure what this message has to do with the thread
"Trigger Function and backup".

Secondly, please show your table definition.

And Finally, the round() mathematical function is ill-defined.  People
have been arguing over this for decades.  Choose either ceil() or
floor() to get a more precise result with appropriate addition or
subtraction of 0.5 to get the "rounding" effect you seem to desire.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux