Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXBQW-0004TR-Ur for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 15:25:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXBQV-0004pK-Tl for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 15:25:35 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXBQU-0004ok-Np for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 15:25:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXBQS-0006Y9-3p for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 15:25:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s37FPVgb019142; Mon, 7 Apr 2014 11:25:31 -0400 From: Tom Lane To: sqlpro@sqlspot.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #9896: Bug in FULL OUTER JOIN In-reply-to: <20140407131705.342.75513@wrigleys.postgresql.org> References: <20140407131705.342.75513@wrigleys.postgresql.org> Comments: In-reply-to sqlpro@sqlspot.com message dated "Mon, 07 Apr 2014 13:17:05 -0000" Date: Mon, 07 Apr 2014 11:25:31 -0400 Message-ID: <19141.1396884331@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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