SQL error: function round(double precision, integer) does not exist - Mailing list pgsql-sql

From TJ O'Donnell
Subject SQL error: function round(double precision, integer) does not exist
Date
Msg-id 4222570F.5080901@acm.org
Whole thread Raw
Responses Re: SQL error: function round(double precision, integer) does not exist  (Michael Fuhr <mike@fuhr.org>)
Re: SQL error: function round(double precision, integer) does not exist  (Din Adrian <adrian.din@easynet.ro>)
Re: SQL error: function round(double precision, integer) does not exist  (Josh Berkus <josh@agliodbs.com>)
Re: [despammed] SQL error: function round(double precision, integer) does not exist  (Andreas Kretschmer <akretschmer@despammed.com>)
Re: SQL error: function round(double precision, integer) does  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
I received the following error when executing a SQL statement:

SQL error:
ERROR:  function round(double precision, integer) does not exist

In statement:

select id,smiles,smarts,parameter,oe_count_matches(smiles,smarts) as count,
round((parameter*oe_count_matches(smiles,smarts)),2)as psa,tpsa(smiles) as ctpsa,tpsa from structure,tpsa where id <
237610and oe_count_matches(smiles,smarts) > 0
 

order by id;

The functions described at:
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.

Can anyone help me with this?

Thanks,
TJ


pgsql-sql by date:

Previous
From: Kai Hessing
Date:
Subject: Re: Advanced SELECT
Next
From: bertolima@yahoo.it (mauro)
Date:
Subject: Re: Postgres 8 - problem: invalid input syntax for integer