X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5D9BB56441 for ; Sun, 27 Feb 2005 23:26:00 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 66716-07 for ; Sun, 27 Feb 2005 23:25:51 +0000 (GMT) Received: from fed1rmmtao03.cox.net (fed1rmmtao03.cox.net [68.230.241.36]) by svr1.postgresql.org (Postfix) with ESMTP id E149A5636D for ; Sun, 27 Feb 2005 23:25:53 +0000 (GMT) Received: from [192.168.1.200] (really [68.111.226.8]) by fed1rmmtao03.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050227232609.IYZB1282.fed1rmmtao03.cox.net@[192.168.1.200]> for ; Sun, 27 Feb 2005 18:26:09 -0500 Message-ID: <4222570F.5080901@acm.org> Date: Sun, 27 Feb 2005 15:26:07 -0800 From: TJ O'Donnell Reply-To: tjo@acm.org User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: SQL error: function round(double precision, integer) does not exist Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/346 X-Sequence-Number: 20456 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 < 237610 and 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