postgresql/src/backend/utils
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
..
adt Provide hashing support for arrays. 2010-10-30 21:56:11 -04:00
cache Provide hashing support for arrays. 2010-10-30 21:56:11 -04:00
error Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
fmgr Fix comparisons of pointers with zero to compare with NULL instead. 2010-10-29 15:51:52 -04:00
hash Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
init Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
mb Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
misc Refactor typenameTypeId() 2010-10-25 21:44:49 +03:00
mmgr Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
resowner Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
sort Eliminate some repetitive coding in tuplesort.c. 2010-10-07 20:32:21 -04:00
time Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
Gen_dummy_probes.sed Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Gen_fmgrtab.pl Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
probes.d Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00