@@ -164,30 +164,37 @@ rumFillScanKey(RumScanOpaque so, OffsetNumber attnum,
164
164
key -> addInfoKeys = NULL ;
165
165
key -> addInfoNKeys = 0 ;
166
166
167
- if (key -> orderBy && key -> attnum == rumstate -> attrnAttachColumn )
167
+ if (key -> orderBy )
168
168
{
169
- if (nQueryValues != 1 )
170
- elog (ERROR , "extractQuery should return only one value for ordering" );
171
- if (rumstate -> canOuterOrdering [attnum - 1 ] == false)
172
- elog (ERROR , "doesn't support ordering as additional info" );
173
- if (rumstate -> origTupdesc -> attrs [rumstate -> attrnAttachColumn - 1 ]-> attbyval == false)
174
- elog (ERROR , "doesn't support order by over pass-by-reference column" );
169
+ if (key -> attnum == rumstate -> attrnAttachColumn )
170
+ {
171
+ if (nQueryValues != 1 )
172
+ elog (ERROR , "extractQuery should return only one value for ordering" );
173
+ if (rumstate -> canOuterOrdering [attnum - 1 ] == false)
174
+ elog (ERROR , "doesn't support ordering as additional info" );
175
+ if (rumstate -> origTupdesc -> attrs [rumstate -> attrnAttachColumn - 1 ]-> attbyval == false)
176
+ elog (ERROR , "doesn't support order by over pass-by-reference column" );
175
177
176
- key -> useAddToColumn = true;
177
- key -> attnum = rumstate -> attrnAddToColumn ;
178
- key -> nentries = 0 ;
179
- key -> nuserentries = 0 ;
178
+ key -> useAddToColumn = true;
179
+ key -> attnum = rumstate -> attrnAddToColumn ;
180
+ key -> nentries = 0 ;
181
+ key -> nuserentries = 0 ;
180
182
181
- key -> outerAddInfoIsNull = true;
183
+ key -> outerAddInfoIsNull = true;
182
184
183
- key -> scanEntry = NULL ;
184
- key -> entryRes = NULL ;
185
- key -> addInfo = NULL ;
186
- key -> addInfoIsNull = NULL ;
185
+ key -> scanEntry = NULL ;
186
+ key -> entryRes = NULL ;
187
+ key -> addInfo = NULL ;
188
+ key -> addInfoIsNull = NULL ;
187
189
188
- so -> willSort = true;
190
+ so -> willSort = true;
189
191
190
- return ;
192
+ return ;
193
+ }
194
+ else if (rumstate -> canOrdering [attnum - 1 ] == false)
195
+ {
196
+ elog (ERROR ,"doesn't support ordering, check operator class definition" );
197
+ }
191
198
}
192
199
193
200
key -> nentries = nQueryValues ;
0 commit comments