forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit188f1b9
committed
Fix coerce_to_target_type for coerce_type's klugy handling of COLLATE.
Because coerce_type recurses into the argument of a CollateExpr,coerce_to_target_type's longstanding code for detecting whether coerce_typehad actually done anything (to wit, returned a different node than itpassed in) was broken in 9.1. This resulted in unexpected failures inhide_coercion_node; which was not the latter's fault, since it's criticalthat we never call it on anything that wasn't inserted by coerce_type.(Else we might decide to "hide" a user-written function call.)Fix by removing and replacing the CollateExpr in coerce_to_target_typeitself. This is all pretty ugly but I don't immediately see a way to makeit nicer.Per report from Jean-Yves F. Barbier.1 parent71b2370 commit188f1b9
File tree
3 files changed
+35
-1
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+35
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
| |||
100 | 114 | | |
101 | 115 | | |
102 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
103 | 129 | | |
104 | 130 | | |
105 | 131 | | |
| |||
318 | 344 | | |
319 | 345 | | |
320 | 346 | | |
321 | | - | |
| 347 | + | |
322 | 348 | | |
323 | 349 | | |
324 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
0 commit comments
Comments
(0)