@@ -157,67 +157,74 @@ typedef struct ExprState
157157 * entries for a particular index. Used for both index_build and
158158 * retail creation of index entries.
159159 *
160- * NumIndexAttrs total number of columns in this index
161- * NumIndexKeyAttrs number of key columns in index
162- * IndexAttrNumbers underlying-rel attribute numbers used as keys
163- * (zeroes indicate expressions). It also contains
164- * info about included columns.
165- * Expressions expr trees for expression entries, or NIL if none
166- * ExpressionsState exec state for expressions, or NIL if none
167- * Predicate partial-index predicate, or NIL if none
168- * PredicateState exec state for predicate, or NIL if none
169- * ExclusionOps Per-column exclusion operators, or NULL if none
170- * ExclusionProcs Underlying function OIDs for ExclusionOps
171- * ExclusionStrats Opclass strategy numbers for ExclusionOps
172- * UniqueOps These are like Exclusion*, but for unique indexes
173- * UniqueProcs
174- * UniqueStrats
175- * Unique is it a unique index?
176- * NullsNotDistinct is NULLS NOT DISTINCT?
177- * ReadyForInserts is it valid for inserts?
178- * CheckedUnchanged IndexUnchanged status determined yet?
179- * IndexUnchanged aminsert hint, cached for retail inserts
180- * Concurrent are we doing a concurrent index build?
181- * BrokenHotChain did we detect any broken HOT chains?
182- * WithoutOverlaps is it a WITHOUT OVERLAPS index?
183- * Summarizing is it a summarizing index?
184- * ParallelWorkers # of workers requested (excludes leader)
185- * Am Oid of index AM
186- * AmCache private cache area for index AM
187- * Context memory context holding this IndexInfo
188- *
189160 * ii_Concurrent, ii_BrokenHotChain, and ii_ParallelWorkers are used only
190161 * during index build; they're conventionally zeroed otherwise.
191162 * ----------------
192163 */
193164typedef struct IndexInfo
194165{
195166 NodeTag type ;
196- int ii_NumIndexAttrs ; /* total number of columns in index */
197- int ii_NumIndexKeyAttrs ; /* number of key columns in index */
167+
168+ /* total number of columns in index */
169+ int ii_NumIndexAttrs ;
170+ /* number of key columns in index */
171+ int ii_NumIndexKeyAttrs ;
172+
173+ /*
174+ * Underlying-rel attribute numbers used as keys (zeroes indicate
175+ * expressions). It also contains info about included columns.
176+ */
198177 AttrNumber ii_IndexAttrNumbers [INDEX_MAX_KEYS ];
178+
179+ /* expr trees for expression entries, or NIL if none */
199180 List * ii_Expressions ; /* list of Expr */
181+ /* exec state for expressions, or NIL if none */
200182 List * ii_ExpressionsState ; /* list of ExprState */
183+
184+ /* partial-index predicate, or NIL if none */
201185 List * ii_Predicate ; /* list of Expr */
186+ /* exec state for expressions, or NIL if none */
202187 ExprState * ii_PredicateState ;
188+
189+ /* Per-column exclusion operators, or NULL if none */
203190 Oid * ii_ExclusionOps ; /* array with one entry per column */
191+ /* Underlying function OIDs for ExclusionOps */
204192 Oid * ii_ExclusionProcs ; /* array with one entry per column */
193+ /* Opclass strategy numbers for ExclusionOps */
205194 uint16 * ii_ExclusionStrats ; /* array with one entry per column */
195+
196+ /* These are like Exclusion*, but for unique indexes */
206197 Oid * ii_UniqueOps ; /* array with one entry per column */
207198 Oid * ii_UniqueProcs ; /* array with one entry per column */
208199 uint16 * ii_UniqueStrats ; /* array with one entry per column */
200+
201+ /* is it a unique index? */
209202 bool ii_Unique ;
203+ /* is NULLS NOT DISTINCT? */
210204 bool ii_NullsNotDistinct ;
205+ /* is it valid for inserts? */
211206 bool ii_ReadyForInserts ;
207+ /* IndexUnchanged status determined yet? */
212208 bool ii_CheckedUnchanged ;
209+ /* aminsert hint, cached for retail inserts */
213210 bool ii_IndexUnchanged ;
211+ /* are we doing a concurrent index build? */
214212 bool ii_Concurrent ;
213+ /* did we detect any broken HOT chains? */
215214 bool ii_BrokenHotChain ;
215+ /* is it a summarizing index? */
216216 bool ii_Summarizing ;
217+ /* is it a WITHOUT OVERLAPS index? */
217218 bool ii_WithoutOverlaps ;
219+ /* # of workers requested (excludes leader) */
218220 int ii_ParallelWorkers ;
221+
222+ /* Oid of index AM */
219223 Oid ii_Am ;
224+ /* private cache area for index AM */
220225 void * ii_AmCache ;
226+
227+ /* memory context holding this IndexInfo */
221228 MemoryContext ii_Context ;
222229} IndexInfo ;
223230
0 commit comments