@@ -139,6 +139,8 @@ typedef struct IndexAmRoutine
139
139
uint16 amstrategies;
140
140
/* total number of support functions that this AM uses */
141
141
uint16 amsupport;
142
+ /* opclass options support function number or 0 */
143
+ uint16 amoptsprocnum;
142
144
/* does AM support ORDER BY indexed column's value? */
143
145
bool amcanorder;
144
146
/* does AM support ORDER BY result of an operator on indexed column? */
@@ -165,6 +167,10 @@ typedef struct IndexAmRoutine
165
167
bool amcanparallel;
166
168
/* does AM support columns included with clause INCLUDE? */
167
169
bool amcaninclude;
170
+ /* does AM use maintenance_work_mem? */
171
+ bool amusemaintenanceworkmem;
172
+ /* OR of parallel vacuum flags */
173
+ uint8 amparallelvacuumoptions;
168
174
/* type of data stored in index, or InvalidOid if variable */
169
175
Oid amkeytype;
170
176
@@ -210,6 +216,8 @@ typedef struct IndexAmRoutine
210
216
uint16 amstrategies;
211
217
/* total number of support functions that this AM uses */
212
218
uint16 amsupport;
219
+ /* opclass options support function number or 0 */
220
+ uint16 amoptsprocnum;
213
221
/* does AM support ORDER BY indexed column's value? */
214
222
bool amcanorder;
215
223
/* does AM support ORDER BY result of an operator on indexed column? */
@@ -236,6 +244,10 @@ typedef struct IndexAmRoutine
236
244
bool amcanparallel;
237
245
/* does AM support columns included with clause INCLUDE? */
238
246
bool amcaninclude;
247
+ /* does AM use maintenance_work_mem? */
248
+ bool amusemaintenanceworkmem;
249
+ /* OR of parallel vacuum flags */
250
+ uint8 amparallelvacuumoptions;
239
251
/* type of data stored in index, or InvalidOid if variable */
240
252
Oid amkeytype;
241
253
@@ -604,7 +616,7 @@ amcanreturn (Relation indexRelation, int attno);
604
616
linkend="indexes-index-only-scans"><firstterm>index-only scans</firstterm></link> on
605
617
the given column, by returning the indexed column values for an index entry
606
618
in the form of an <structname>IndexTuple</structname>. The attribute number
607
- is 1-based, i.e. the first column's attno is 1. Returns true if supported,
619
+ is 1-based, i.e., the first column's attno is 1. Returns true if supported,
608
620
else false. If the access method does not support index-only scans at all,
609
621
the <structfield>amcanreturn</structfield> field in its <structname>IndexAmRoutine</structname>
610
622
struct can be set to NULL.
@@ -684,7 +696,7 @@ amoptions (ArrayType *reloptions,
684
696
</programlisting>
685
697
分析和验证一个索引的 reloptions 数组。仅当一个索引存在非空 reloptions 数组时才会被调用。<parameter>reloptions</parameter>是一个<type>text</type>数组,包含<replaceable>name</replaceable><literal>=</literal><replaceable>value</replaceable>形式的项。 该函数应当构建一个<type>bytea</type>值,该值将被拷贝进索引的 relcache 项的<structfield>rd_options</structfield>域。<type>bytea</type>值的数据内容是开放由访问方法定义的, 大部分的标准访问方法都使用<structname>StdRdOptions</structname>结构。当<parameter>validate</parameter>为真时,如果任何一个选项都不可识别或者含有非法值,该函数都应当报告一个适当的错误消息;当<parameter>validate</parameter>为假时,非法 项应该被安静地忽略(当正在载入的选项已经在<structname>pg_catalog</structname>中时, <parameter>validate</parameter>为假;仅在访问方法已经改变了选项的规则时才可能找 到非法项,并且在此情况下忽略废弃的项是合适的)。如果想要默认行为,那么返回 NULL 也 OK。
686
698
</para>
687
-
699
+
688
700
<!--==========================orignal english content==========================
689
701
<para>
690
702
<programlisting>
@@ -889,7 +901,7 @@ amgettuple (IndexScanDesc scan,
889
901
will pass the caller's snapshot test. On success, <function>amgettuple</function>
890
902
must also set <literal>scan->xs_recheck</literal> to true or false.
891
903
False means it is certain that the index entry matches the scan keys.
892
- true means this is not certain, and the conditions represented by the
904
+ True means this is not certain, and the conditions represented by the
893
905
scan keys must be rechecked against the heap tuple after fetching it.
894
906
This provision supports <quote>lossy</quote> index operators.
895
907
Note that rechecking will extend only to the scan conditions; a partial
@@ -1025,7 +1037,7 @@ ammarkpos (IndexScanDesc scan);
1025
1037
</programlisting>
1026
1038
标记当前扫描位置。访问方法只需要支持每个扫描里面有一个被标记的扫描位置。
1027
1039
</para>
1028
-
1040
+
1029
1041
<!--==========================orignal english content==========================
1030
1042
<para>
1031
1043
The <function>ammarkpos</function> function need only be provided if the access
0 commit comments