pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: sqlpro@sqlspot.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #9896: Bug in FULL OUTER JOIN
Date: Mon, 07 Apr 2014 11:25:31 -0400
Message-ID: <19141.1396884331@sss.pgh.pa.us> (raw)
In-Reply-To: <20140407131705.342.75513@wrigleys.postgresql.org>
References: <20140407131705.342.75513@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

sqlpro@sqlspot.com writes:
> SELECT *
> FROM   T_CLIENT_CLI AS C
>        FULL OUTER JOIN T_PROSPECT_PSP AS P
>             ON C.CLI_SIREN = P.PSP_SIREN
>             OR C.CLI_ENSEIGNE = P.PSP_ENSEIGNE;

> But PG throw an exception :

> ERREUR:  FULL JOIN is only supported with merge-joinable or hash-joinable
> join conditions

Yeah.  The problem is the OR condition, which doesn't provide anything
that will work with either of those methods.

> By comparizon, this query guive the exact answer in :
> - MS SQL Server since version 2000 to 2014 (2005, 2008/2008R2, 2012).
> - Oracle 11G

Interesting.  I wonder where they keep the per-row match status?

Can you show us the query plans used by those systems?

In any case, don't hold your breath waiting for a fix; I'm just asking
to gather information for possible future work.  This is unlikely to
be simple to fix, and it's not going to be very high on anyone's priority
list either, given that few people use FULL JOIN as far as I've heard.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <19141.1396884331@sss.pgh.pa.us>
Permalink:  ../19141.1396884331@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19141.1396884331@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sqlpro@sqlspot.com
  Subject: Re: BUG #9896: Bug in FULL OUTER JOIN
  In-Reply-To: <19141.1396884331@sss.pgh.pa.us>
  References: <20140407131705.342.75513@wrigleys.postgresql.org> <19141.1396884331@sss.pgh.pa.us>

* 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