* assign_query_collations() * Mark all expressions in the given Query with collation information. * * This should be applied to each Query after completion of parse analysis * for expressions. Note that we do not recurse into sub-Queries, since * those should have been processed when built. */
| 98 | * those should have been processed when built. |
| 99 | */ |
| 100 | void |
| 101 | assign_query_collations(ParseState *pstate, Query *query) |
| 102 | { |
| 103 | /* |
| 104 | * We just use query_tree_walker() to visit all the contained expressions. |
| 105 | * We can skip the rangetable and CTE subqueries, though, since RTEs and |
| 106 | * subqueries had better have been processed already (else Vars referring |
| 107 | * to them would not get created with the right collation). |
| 108 | */ |
| 109 | (void) query_tree_walker(query, |
| 110 | assign_query_collations_walker, |
| 111 | (void *) pstate, |
| 112 | QTW_IGNORE_RANGE_TABLE | |
| 113 | QTW_IGNORE_CTE_SUBQUERIES); |
| 114 | } |
| 115 | |
| 116 | /* |
| 117 | * Walker for assign_query_collations |
no test coverage detected