agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Josh Berkus <josh@agliodbs.com>
To: tjo@acm.org
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL error: function round(double precision, integer) does not exist
Date: Mon, 28 Feb 2005 09:30:11 -0800
Message-ID: <200502280930.11969.josh@agliodbs.com> (raw)
In-Reply-To: <4222570F.5080901@acm.org>
References: <4222570F.5080901@acm.org>
TJ,
> SQL error:
> ERROR: function round(double precision, integer) does not exist
> http://www.postgresql.org/docs/7.4/static/functions-math.html
> show that round(numeric,int) should work ok.
> If I use round() without a second argument, it works OK, but
> this gives a loss of precision which I do not want.
NUMERIC and FLOAT are different data types. Do:
round({value}::NUMERIC, {places})
--
Josh Berkus
Aglio Database Solutions
San Francisco
view thread (16+ messages) latest in thread
Message-ID: <200502280930.11969.josh@agliodbs.com>
Permalink: ../200502280930.11969.josh@agliodbs.com/
Also on: postgresql.org/message-id/200502280930.11969.josh@agliodbs.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: josh@agliodbs.com, tjo@acm.org
Subject: Re: SQL error: function round(double precision, integer) does not exist
In-Reply-To: <200502280930.11969.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox