pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org
Subject: Re: "left join" not working?
Date: Fri, 12 Feb 2010 12:57:47 +0100
Message-ID: <20100212115747.GA21659@apartia.fr> (raw)
In-Reply-To: <34E07A4C4CDA4FFCB56CD63C675568ED@marktestcr.marktest.pt>
References: <20100212111453.GA16318@apartia.fr>
	<34E07A4C4CDA4FFCB56CD63C675568ED@marktestcr.marktest.pt>

On Fri, Feb 12, 2010 at 11:35:02AM -0000, Oliveiros C, wrote:
> My first guess is that
> NULL fails the condition on your WHERE clause,
> p.id_line = 1
> 
> So your WHERE clause introduces an additional level of filtering
> that filters out the NULLs coming from the LEFT JOIN...

So, if I understand correctly, a WHERE filters all results regardless of
join conditions and can turn an OUTER JOIN into an INNER JOIN.

Thanks for pointing that out!



view thread (5+ messages)  latest in thread

Message-ID: <20100212115747.GA21659@apartia.fr>
Permalink:  ../20100212115747.GA21659@apartia.fr/
Also on:    postgresql.org/message-id/20100212115747.GA21659@apartia.fr

 · 

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: vindex+lists-pgsql-sql@apartia.org
  Subject: Re: "left join" not working?
  In-Reply-To: <20100212115747.GA21659@apartia.fr>

* 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