pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Raymond O'Donnell <rod@iol.ie>
To: Michael Thorsen <mthorsen1980@gmail.com>
To: PostgreSQL <pgsql-general@postgresql.org>
Subject: Re: SQL query
Date: Sat, 22 Nov 2008 16:23:31 +0000
Message-ID: <49283203.4000704@iol.ie> (raw)
In-Reply-To: <4c8d33a90811220807h56da5c24w1f94d731ebebdb19@mail.gmail.com>
References: <4c8d33a90811212033x5e88177eo7a026b10336c975b@mail.gmail.com>
	<4928297C.1070805@iol.ie>
	<4c8d33a90811220807h56da5c24w1f94d731ebebdb19@mail.gmail.com>

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
------------------------------------------------------------------



view thread (45+ messages)  latest in thread

Message-ID: <49283203.4000704@iol.ie>
Permalink:  ../49283203.4000704@iol.ie/
Also on:    postgresql.org/message-id/49283203.4000704@iol.ie

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: rod@iol.ie, mthorsen1980@gmail.com
  Subject: Re: SQL query
  In-Reply-To: <49283203.4000704@iol.ie>
  References: <4c8d33a90811212033x5e88177eo7a026b10336c975b@mail.gmail.com> <4928297C.1070805@iol.ie> <4c8d33a90811220807h56da5c24w1f94d731ebebdb19@mail.gmail.com> <49283203.4000704@iol.ie>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox