Tom Lane wrote:
> It appears that join_clause_is_redundant() is rejecting the clause as
> redundant. I suppose some part of that machinery gets confused by the
> fact that the RHS of the clause references both relations. The
> EquivalenceClass rewrite cleaned this whole area up greatly, so no
> surprise that the bug is gone in HEAD. No time to look at it more now.
Yeah, that's it.
I don't understand that code very well. Why does it think that the right
pathkeys of "test1.id = test2.id" and "test1.id = test1.id+test2.id" are
Checking for overlapping left and right relation sets in
join_clause_is_redundant seems to fix the problem, though I'm not sure
if there's some other cases that that doesn't catch.
In response to
pgsql-bugs by date
|Next:||From: Marc Schablewski||Date: 2007-07-31 10:21:44|
|Subject: Re: BUG #3484: Missing pg_clog file / corrupt index|
|Previous:||From: Decibel!||Date: 2007-07-31 01:39:02|
|Subject: Re: Some errors in PostgreSQL installestion|