aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execGrouping.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-01-30 01:33:36 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-01-30 01:33:36 +0000
commita635c08fa10fe545d723bcec6eb73bfdca07e2c0 (patch)
tree83ac01972011232d6841e60cd830fe34ac2463d5 /src/backend/executor/execGrouping.c
parente8cd6f14a26bbecd3d8abcf36235a033cb035678 (diff)
downloadpostgresql-a635c08fa10fe545d723bcec6eb73bfdca07e2c0.tar.gz
postgresql-a635c08fa10fe545d723bcec6eb73bfdca07e2c0.zip
Add support for cross-type hashing in hash index searches and hash joins.
Hashing for aggregation purposes still needs work, so it's not time to mark any cross-type operators as hashable for general use, but these cases work if the operators are so marked by hand in the system catalogs.
Diffstat (limited to 'src/backend/executor/execGrouping.c')
-rw-r--r--src/backend/executor/execGrouping.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/backend/executor/execGrouping.c b/src/backend/executor/execGrouping.c
index f84c1120db2..08391bcc459 100644
--- a/src/backend/executor/execGrouping.c
+++ b/src/backend/executor/execGrouping.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execGrouping.c,v 1.23 2007/01/10 18:06:02 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execGrouping.c,v 1.24 2007/01/30 01:33:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -224,15 +224,18 @@ execTuplesHashPrepare(int numCols,
{
Oid eq_opr = eqOperators[i];
Oid eq_function;
- Oid hash_function;
+ Oid left_hash_function;
+ Oid right_hash_function;
eq_function = get_opcode(eq_opr);
- hash_function = get_op_hash_function(eq_opr);
- if (!OidIsValid(hash_function)) /* should not happen */
+ if (!get_op_hash_functions(eq_opr,
+ &left_hash_function, &right_hash_function))
elog(ERROR, "could not find hash function for hash operator %u",
eq_opr);
+ /* For the moment, we're not supporting cross-type cases here */
+ Assert(left_hash_function == right_hash_function);
fmgr_info(eq_function, &(*eqFunctions)[i]);
- fmgr_info(hash_function, &(*hashFunctions)[i]);
+ fmgr_info(right_hash_function, &(*hashFunctions)[i]);
}
}