@@ -124,25 +124,25 @@ initRumState(RumState * state, Relation index)
124124 state -> oneCol = (origTupdesc -> natts == 1 ) ? true : false;
125125 state -> origTupdesc = origTupdesc ;
126126
127- state -> attrnOrderByColumn = InvalidAttrNumber ;
127+ state -> attrnAttachColumn = InvalidAttrNumber ;
128128 state -> attrnAddToColumn = InvalidAttrNumber ;
129129 if (index -> rd_options )
130130 {
131131 RumOptions * options = (RumOptions * ) index -> rd_options ;
132132
133- if (options -> orderByColumn > 0 )
133+ if (options -> attachColumn > 0 )
134134 {
135- char * colname = (char * ) options + options -> orderByColumn ;
135+ char * colname = (char * ) options + options -> attachColumn ;
136136 AttrNumber attrnOrderByHeapColumn ;
137137
138138 attrnOrderByHeapColumn = get_attnum (index -> rd_index -> indrelid , colname );
139139
140140 if (!AttributeNumberIsValid (attrnOrderByHeapColumn ))
141141 elog (ERROR , "attribute \"%s\" is not found in table" , colname );
142142
143- state -> attrnOrderByColumn = get_attnum (index -> rd_id , colname );
143+ state -> attrnAttachColumn = get_attnum (index -> rd_id , colname );
144144
145- if (!AttributeNumberIsValid (state -> attrnOrderByColumn ))
145+ if (!AttributeNumberIsValid (state -> attrnAttachColumn ))
146146 elog (ERROR , "attribute \"%s\" is not found in index" , colname );
147147 }
148148
@@ -162,13 +162,13 @@ initRumState(RumState * state, Relation index)
162162 elog (ERROR , "attribute \"%s\" is not found in index" , colname );
163163 }
164164
165- if (!(AttributeNumberIsValid (state -> attrnOrderByColumn ) &&
165+ if (!(AttributeNumberIsValid (state -> attrnAttachColumn ) &&
166166 AttributeNumberIsValid (state -> attrnAddToColumn )))
167167 elog (ERROR , "AddTo and OrderBy columns should be defined both" );
168168
169169 if (options -> useAlternativeOrder )
170170 {
171- if (!(AttributeNumberIsValid (state -> attrnOrderByColumn ) &&
171+ if (!(AttributeNumberIsValid (state -> attrnAttachColumn ) &&
172172 AttributeNumberIsValid (state -> attrnAddToColumn )))
173173 elog (ERROR , "to use alternative ordering AddTo and OrderBy should be defined" );
174174
@@ -197,7 +197,7 @@ initRumState(RumState * state, Relation index)
197197 elog (ERROR , "AddTo could should not have AddInfo" );
198198
199199 rumConfig -> addInfoTypeOid = origTupdesc -> attrs [
200- state -> attrnOrderByColumn - 1 ]-> atttypid ;
200+ state -> attrnAttachColumn - 1 ]-> atttypid ;
201201 }
202202
203203 if (state -> oneCol )
@@ -797,8 +797,7 @@ rumoptions(Datum reloptions, bool validate)
797797 RumOptions * rdopts ;
798798 int numoptions ;
799799 static const relopt_parse_elt tab [] = {
800- {"fastupdate" , RELOPT_TYPE_BOOL , offsetof(RumOptions , useFastUpdate )},
801- {"attach" , RELOPT_TYPE_STRING , offsetof(RumOptions , orderByColumn )},
800+ {"attach" , RELOPT_TYPE_STRING , offsetof(RumOptions , attachColumn )},
802801 {"to" , RELOPT_TYPE_STRING , offsetof(RumOptions , addToColumn )},
803802 {"order_by_attach" , RELOPT_TYPE_BOOL , offsetof(RumOptions , useAlternativeOrder )}
804803 };
0 commit comments