forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitac7a5a3
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 parenta8ab8d0 commitac7a5a3
File tree
3 files changed
+35
-1
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+35
-1
lines changedLines changed: 27 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
| 82 | + | |
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
85 | 86 |
| |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
86 | 100 |
| |
87 | 101 |
| |
88 | 102 |
| |
| |||
98 | 112 |
| |
99 | 113 |
| |
100 | 114 |
| |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
101 | 127 |
| |
102 | 128 |
| |
103 | 129 |
| |
| |||
318 | 344 |
| |
319 | 345 |
| |
320 | 346 |
| |
321 |
| - | |
| 347 | + | |
322 | 348 |
| |
323 | 349 |
| |
324 | 350 |
| |
|
Lines changed: 3 additions & 0 deletions
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 |
| |
|
Lines changed: 5 additions & 0 deletions
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)