forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf535f35
committed
Fix handling of polymorphic output arguments for procedures.
Most of the infrastructure for procedure arguments was alreadyokay with polymorphic output arguments, but it turns out thatCallStmtResultDesc() was a few bricks shy of a load here. It thoughtall it needed to do was call build_function_result_tupdesc_t, butthat function specifically disclaims responsibility for resolvingpolymorphic arguments. Failing to handle that doesn't seem to bea problem for CALL in plpgsql, but CALL from plain SQL would geterrors like "cannot display a value of type anyelement", or evencrash outright.In v14 and later we can simply examine the exposed types of theCallStmt.outargs nodes to get the right type OIDs. But it's a lotmore complicated to fix in v12/v13, because those versions don'thave CallStmt.outargs, nor do they do expand_function_argumentsuntil ExecuteCallStmt runs. We have to duplicatively runexpand_function_arguments, and then re-determine which elementsof the args list are output arguments.Per bug #18463 from Drew Kimball. Back-patch to all supportedversions, since it's busted in all of them.Discussion:https://postgr.es/m/18463-f8cd77e12564d8a2@postgresql.org1 parent245f1ce commitf535f35
File tree
5 files changed
+144
-0
lines changed- src
- backend/commands
- pl/plpgsql/src
- expected
- sql
- test/regress
- expected
- sql
5 files changed
+144
-0
lines changedLines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| 55 | + | |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| |||
2364 | 2365 |
| |
2365 | 2366 |
| |
2366 | 2367 |
| |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
2367 | 2395 |
| |
2368 | 2396 |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
409 | 409 |
| |
410 | 410 |
| |
411 | 411 |
| |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
412 | 446 |
| |
413 | 447 |
| |
414 | 448 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
378 | 408 |
| |
379 | 409 |
| |
380 | 410 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
196 | 230 |
| |
197 | 231 |
| |
198 | 232 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
134 | 152 |
| |
135 | 153 |
| |
136 | 154 |
| |
|
0 commit comments
Comments
(0)