Re: SQL query - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: SQL query
Date
Msg-id 49283203.4000704@iol.ie
Whole thread Raw
In response to SQL query  ("Michael Thorsen" <mthorsen1980@gmail.com>)
List pgsql-general
On 22/11/2008 16:07, Michael Thorsen wrote:
> For the most part yes. The price and value were "real" columns,
> otherwise the rest of it is the same. On a small data set I seem to get

That's almost certainly the problem, so - rounding errors are causing
the equality test in the join to fail. You should use NUMERIC for those
floating-point values.

Have a look at what the docs say on REAL and family:

http://www.postgresql.org/docs/8.3/static/datatype-numeric.html#DATATYPE-FLOAT

Ray.


PS - please don't top-post, as it makes the thread difficult to follow.


------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: SQL query
Next
From: Shane Ambler
Date:
Subject: Re: Using Postgres to store high volume streams of sensor readings