Tom Lane wrote:
Dennis Haney <davh@diku.dk> writes:

Consider this example:
SELECT * FROM a,b WHERE a.id = b.id AND (a.id) IN (SELECT c.id FROM c)
the possible execution trees are {{a,b}, {c}}, {{a,c},{b}} and the code
seems to also permit {{b,c},{a}}.
No, it does not --- as you say, that would give wrong answers. That
case is eliminated by the tests following this comment:

* JOIN_IN technique will work if outerrel includes LHS and
* innerrel is exactly RHS; conversely JOIN_REVERSE_IN handles
* RHS/LHS.
*
* JOIN_UNIQUE_OUTER will work if outerrel is exactly RHS;
* conversely JOIN_UNIQUE_INNER will work if innerrel is
* exactly RHS.

Joining {b,c} to {a} does not meet any of those four allowed cases.
Exactly my point... So why ever bother creating the {b,c} node which is
legal by the above definition?


--
Dennis
use Inline C => q{void p(char*g){
printf("Just Another %s Hacker\n",g);}};p("Perl");

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 7 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedMar 5, '04 at 5:29p
activeMar 8, '04 at 4:04p
posts7
users2
websitepostgresql.org...
irc#postgresql

2 users in discussion

Dennis Haney: 4 posts Tom Lane: 3 posts

People

Translate

site design / logo © 2021 Grokbase