Re: outer join fails with error - solaris only - Mailing list pgsql-general

From Tom Lane
Subject Re: outer join fails with error - solaris only
Date
Msg-id 12240.990123895@sss.pgh.pa.us
Whole thread Raw
In response to outer join fails with error - solaris only  (danw@rtp.ericsson.se)
Responses Re: outer join fails with error - solaris only  (Daniel Wickstrom <danw@rtp.ericsson.se>)
Re: outer join fails with error - solaris only  (Daniel Wickstrom <danw@rtp.ericsson.se>)
List pgsql-general
danw@rtp.ericsson.se writes:
> The following query gives an error when run on solaris 2.7, but it works
> fine with an equivalent configuration on rh 6.2.

It probably has nothing to do with the platform, but rather with when
you last ran VACUUM ANALYZE and what the exact contents of the database
were at the time.  Does the problem become reproducible on both
platforms if you do
    SET enable_hashjoin TO off;
    SET enable_nestloop TO off;

> ERROR:  RIGHT JOIN is only supported with mergejoinable join conditions

I believe this is fixed in 7.1.1 --- sounds like the same bug as

2001-04-14 20:48  tgl

    * src/backend/optimizer/path/joinpath.c: Prevent generation of
    invalid plans for RIGHT or FULL joins with multiple join clauses.
    The mergejoin executor wants all the join clauses to appear as
    merge quals, not as extra joinquals, for these kinds of joins.    But
    the planner would consider plans in which partially-sorted input
    paths were used, leading to only some of the join clauses becoming
    merge quals.  This is fine for inner/left joins, not fine for
    right/full joins.

            regards, tom lane

pgsql-general by date:

Previous
From: danw@rtp.ericsson.se
Date:
Subject: outer join fails with error - solaris only
Next
From: Daniel Wickstrom
Date:
Subject: Re: outer join fails with error - solaris only