postgresql/src/backend/optimizer/path
Tom Lane 186cbbda8f Provide hashing support for arrays.
The core of this patch is hash_array() and associated typcache
infrastructure, which works just about exactly like the existing support
for array comparison.

In addition I did some work to ensure that the planner won't think that an
array type is hashable unless its element type is hashable, and similarly
for sorting.  This includes adding a datatype parameter to op_hashjoinable
and op_mergejoinable, and adding an explicit "hashable" flag to
SortGroupClause.  The lack of a cross-check on the element type was a
pre-existing bug in mergejoin support --- but it didn't matter so much
before, because if you couldn't sort the element type there wasn't any good
alternative to failing anyhow.  Now that we have the alternative of hashing
the array type, there are cases where we can avoid a failure by being picky
at the planner stage, so it's time to be picky.

The issue of exactly how to combine the per-element hash values to produce
an array hash is still open for discussion, but the rest of this is pretty
solid, so I'll commit it as-is.
2010-10-30 21:56:11 -04:00
..
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
allpaths.c Support MergeAppend plans, to allow sorted output from append relations. 2010-10-14 16:57:57 -04:00
clausesel.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
costsize.c Support MergeAppend plans, to allow sorted output from append relations. 2010-10-14 16:57:57 -04:00
equivclass.c Provide hashing support for arrays. 2010-10-30 21:56:11 -04:00
indxpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
joinpath.c Avoid creation of useless EquivalenceClasses during planning. 2010-10-29 11:52:50 -04:00
joinrels.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
orindxpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pathkeys.c Avoid creation of useless EquivalenceClasses during planning. 2010-10-29 11:52:50 -04:00
tidpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00