summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/plan/subselect.c
diff options
context:
space:
mode:
authorTom Lane2022-01-16 21:39:26 +0000
committerTom Lane2022-01-16 21:39:26 +0000
commit6478896675660402171c97d6307e6e1519250025 (patch)
tree1cc838e570e2c916ac8601609e6eb48f01f8b6d6 /src/backend/optimizer/plan/subselect.c
parentfe75517443b7c38f5251d007d06321655ce6c0b6 (diff)
Teach hash_ok_operator() that record_eq is only sometimes hashable.
The need for this was foreseen long ago, but when record_eq actually became hashable (in commit 01e658fa7), we missed updating this spot. Per bug #17363 from Elvis Pranskevichus. Back-patch to v14 where the faulty commit came in. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/optimizer/plan/subselect.c')
-rw-r--r--src/backend/optimizer/plan/subselect.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index 8c9408d372d..41bd1ae7d44 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -848,10 +848,10 @@ hash_ok_operator(OpExpr *expr)
/* quick out if not a binary operator */
if (list_length(expr->args) != 2)
return false;
- if (opid == ARRAY_EQ_OP)
+ if (opid == ARRAY_EQ_OP ||
+ opid == RECORD_EQ_OP)
{
- /* array_eq is strict, but must check input type to ensure hashable */
- /* XXX record_eq will need same treatment when it becomes hashable */
+ /* these are strict, but must check input type to ensure hashable */
Node *leftarg = linitial(expr->args);
return op_hashjoinable(opid, exprType(leftarg));