Skip site navigation (1) Skip section navigation (2)

Re: BUG #4934: regression in IN with joins in subselect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Benjamin Reed <ranger(at)opennms(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4934: regression in IN with joins in subselect
Date: 2009-07-23 00:34:47
Message-ID: 5972.1248309287@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Benjamin Reed <ranger(at)opennms(dot)org> writes:
> Attached is a test case, including the query that causes the error at
> the end.  On 8.3, it returns 1 row (192.168.1.1), on 8.4 including the
> git 8.4 branch, it returns none.

Thanks, it seems like the problem is that it's applying *both* its
methods for implementing an IN join: it's unique-ifying the sub-select
output via a HashAggregate, and then using a Semi Join anyway when that
gets joined to the "node" table.  And the Semi Join has indeterminate
output for some of the other output columns.  (The join order it's
choosing seems a bit odd too, but with so few rows in the tables it may
be that all the join orders seem to have the same cost.)  I think this
is probably a small fix, but running out of energy for tonight ...

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Lauris UlmanisDate: 2009-07-23 10:47:47
Subject: Postgres user authentification or LDAP authentification
Previous:From: Benjamin ReedDate: 2009-07-22 21:31:56
Subject: Re: BUG #4934: regression in IN with joins in subselect

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group