aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-09-15 09:40:34 +1200
committerDavid Rowley <drowley@postgresql.org>2022-09-15 09:40:34 +1200
commit63840526b05c5c12c92cb16be8748e4d20e6eab6 (patch)
tree8aaff9c30f7352599820951425a436d73ea4d26d /src
parent111d954024c8f4e6d8d273d8e7c1d64d14435bf5 (diff)
downloadpostgresql-63840526b05c5c12c92cb16be8748e4d20e6eab6.tar.gz
postgresql-63840526b05c5c12c92cb16be8748e4d20e6eab6.zip
Fix outdated convert_saop_to_hashed_saop comment
In 29f45e299, we added support for optimizing the execution of NOT IN(values) by using a hash table instead of a linear search over the array. That commit neglected to update the header comment for convert_saop_to_hashed_saop() to mention this fact. Here we fix that. Author: James Coleman Discussion: https://postgr.es/m/CAAaqYe99NUpAPcxgchGstgM23fmiGjqQPot8627YgkBgNt=BfA@mail.gmail.com Backpatch-through: 15, where 29f45e299 was added.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/util/clauses.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 5c54171fee0..bf3a7cae60a 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -2117,7 +2117,8 @@ eval_const_expressions(PlannerInfo *root, Node *node)
*
* We'll use a hash table if all of the following conditions are met:
* 1. The 2nd argument of the array contain only Consts.
- * 2. useOr is true.
+ * 2. useOr is true or there is a valid negator operator for the
+ * ScalarArrayOpExpr's opno.
* 3. There's valid hash function for both left and righthand operands and
* these hash functions are the same.
* 4. If the array contains enough elements for us to consider it to be