* Calculate the expressions in the ORDER BY clause, based on the heap tuple. */
| 361 | * Calculate the expressions in the ORDER BY clause, based on the heap tuple. |
| 362 | */ |
| 363 | static void |
| 364 | EvalOrderByExpressions(IndexScanState *node, ExprContext *econtext) |
| 365 | { |
| 366 | int i; |
| 367 | ListCell *l; |
| 368 | MemoryContext oldContext; |
| 369 | |
| 370 | oldContext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory); |
| 371 | |
| 372 | i = 0; |
| 373 | foreach(l, node->indexorderbyorig) |
| 374 | { |
| 375 | ExprState *orderby = (ExprState *) lfirst(l); |
| 376 | |
| 377 | node->iss_OrderByValues[i] = ExecEvalExpr(orderby, |
| 378 | econtext, |
| 379 | &node->iss_OrderByNulls[i]); |
| 380 | i++; |
| 381 | } |
| 382 | |
| 383 | MemoryContextSwitchTo(oldContext); |
| 384 | } |
| 385 | |
| 386 | /* |
| 387 | * IndexRecheck -- access method routine to recheck a tuple in EvalPlanQual |
no test coverage detected