]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix misleading comment for GetOperatorFromCompareType
authorDavid Rowley <drowley@postgresql.org>
Tue, 6 Jan 2026 02:16:14 +0000 (15:16 +1300)
committerDavid Rowley <drowley@postgresql.org>
Tue, 6 Jan 2026 02:16:14 +0000 (15:16 +1300)
The comment claimed *strat got set to InvalidStrategy when the function
lookup fails.  This isn't true; an ERROR is raised when that happens.

Author: Paul A Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Discussion: https://postgr.es/m/CA+renyXOrjLacP_nhqEQUf2W+ZCoY2q5kpQCfG05vQVYzr8b9w@mail.gmail.com
Backpatch-through: 18

src/backend/commands/indexcmds.c

index 755dc00c86f85e8ba152b7af1832409135b2047b..0a7b6f18fa28373bc4d7f032acfe00c6a9d4c47e 100644 (file)
@@ -2460,8 +2460,8 @@ GetDefaultOpClass(Oid type_id, Oid am_id)
  * Finds an operator from a CompareType.  This is used for temporal index
  * constraints (and other temporal features) to look up equality and overlaps
  * operators.  We ask an opclass support function to translate from the
- * compare type to the internal strategy numbers.  If the function isn't
- * defined or it gives no result, we set *strat to InvalidStrategy.
+ * compare type to the internal strategy numbers.  Raises ERROR on search
+ * failure.
  */
 void
 GetOperatorFromCompareType(Oid opclass, Oid rhstype, CompareType cmptype,