agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: TJ O'Donnell <tjo@acm.org>
To: pgsql-sql@postgresql.org
Subject: SQL error: function round(double precision, integer) does not exist
Date: Sun, 27 Feb 2005 15:26:07 -0800
Message-ID: <4222570F.5080901@acm.org> (raw)

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



view thread (16+ messages)  latest in thread

Message-ID: <4222570F.5080901@acm.org>
Permalink:  ../4222570F.5080901@acm.org/
Also on:    postgresql.org/message-id/4222570F.5080901@acm.org

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: tjo@acm.org
  Subject: Re: SQL error: function round(double precision, integer) does not exist
  In-Reply-To: <4222570F.5080901@acm.org>

* 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