postgresql/src
Tom Lane f4e4b32743 Support RIGHT and FULL OUTER JOIN in hash joins.
This is advantageous first because it allows us to hash the smaller table
regardless of the outer-join type, and second because hash join can be more
flexible than merge join in dealing with arbitrary join quals in a FULL
join.  For merge join all the join quals have to be mergejoinable, but hash
join will work so long as there's at least one hashjoinable qual --- the
others can be any condition.  (This is true essentially because we don't
keep per-inner-tuple match flags in merge join, while hash join can do so.)

To do this, we need a has-it-been-matched flag for each tuple in the
hashtable, not just one for the current outer tuple.  The key idea that
makes this practical is that we can store the match flag in the tuple's
infomask, since there are lots of bits there that are of no interest for a
MinimalTuple.  So we aren't increasing the size of the hashtable at all for
the feature.

To write this without turning the hash code into even more of a pile of
spaghetti than it already was, I rewrote ExecHashJoin in a state-machine
style, similar to ExecMergeJoin.  Other than that decision, it was pretty
straightforward.
2010-12-30 20:26:08 -05:00
..
backend Support RIGHT and FULL OUTER JOIN in hash joins. 2010-12-30 20:26:08 -05:00
bin Support unlogged tables. 2010-12-29 06:48:53 -05:00
include Support RIGHT and FULL OUTER JOIN in hash joins. 2010-12-30 20:26:08 -05:00
interfaces Fix ill-advised placement of PGRES_COPY_BOTH enum value. 2010-12-28 11:02:10 -05:00
makefiles Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
pl Corrections to patch adding SQL/MED error codes. 2010-12-26 21:35:25 -05:00
port Remove optreset from src/port/ implementations of getopt and getopt_long. 2010-12-16 16:23:05 -05:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Add REPLICATION privilege for ROLEs 2010-12-29 11:05:03 +01:00
timezone Update time zone data files to tzdata release 2010o: DST law changes in 2010-12-13 12:45:31 -05:00
tools Remove -fno-operator-names switch from cpluspluscheck. 2010-12-27 15:03:24 -05:00
tutorial Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Additional fixes for parallel make 2010-11-17 08:08:41 +02:00
Makefile.global.in Only build in crashdump support on Windows if there's a working dbghelp.h. 2010-12-26 10:34:47 -05:00
Makefile.shlib Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00