Fix incorrect IndexOptInfo header comment
authorDavid Rowley <[email protected]>
Mon, 24 Nov 2025 04:01:34 +0000 (17:01 +1300)
committerDavid Rowley <[email protected]>
Mon, 24 Nov 2025 04:01:34 +0000 (17:01 +1300)
The comment incorrectly indicated that indexcollations[] stored
collations for both key columns and INCLUDE columns, but in reality it
only has elements for the key columns.  canreturn[] didn't get a mention,
so add that while we're here.

Author: Junwang Zhao <[email protected]>
Reviewed-by: David Rowley <[email protected]>
Discussion: https://postgr.es/m/CAEG8a3LwbZgMKOQ9CmZarX5DEipKivdHp5PZMOO-riL0w%3DL%3D4A%40mail.gmail.com
Backpatch-through: 14

src/include/nodes/pathnodes.h

index 69d7b3d9b83b15621ecda08b81a3be4a0ef9a638..0162d59e079bb1d8e9f30895cdd7f681ff73edb2 100644 (file)
@@ -1054,9 +1054,10 @@ typedef struct RelOptInfo
  * IndexOptInfo
  *     Per-index information for planning/optimization
  *
- *     indexkeys[], indexcollations[] each have ncolumns entries.
- *     opfamily[], and opcintype[] each have nkeycolumns entries. They do
- *     not contain any information about included attributes.
+ *     indexkeys[] and canreturn[] each have ncolumns entries.
+ *
+ *     indexcollations[], opfamily[], and opcintype[] each have nkeycolumns
+ *     entries.  These don't contain any information about INCLUDE columns.
  *
  *     sortopfamily[], reverse_sort[], and nulls_first[] have
  *     nkeycolumns entries, if the index is ordered; but if it is unordered,