forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2f02d4a
committed
Allow extracting fields from a ROW() expression in more cases.
Teach get_expr_result_type() to manufacture a tuple descriptor directlyfrom a RowExpr node. If the RowExpr has type RECORD, this is the onlyway to get a tupdesc for its result, since even if the rowtype has beenblessed, we don't have its typmod available at this point. (If theRowExpr has some named composite type, we continue to let the existingcode handle it, since the RowExpr might well not have the correct columnnames embedded in it.)This fixes assorted corner cases illustrated by the added regressiontests.This is a back-patch of the v13-era commit8b7a0f1 into previousbranches. At the time I'd judged it not important enough to back-patch,but the upcoming fix for bug #18077 includes a test case that dependson this working correctly; and8b7a0f1 has now aged long enough tohave good confidence that it won't break anything.Discussion:https://postgr.es/m/10872.1572202006@sss.pgh.pa.usDiscussion:https://postgr.es/m/3607145.1694803130@sss.pgh.pa.us1 parent50d44c1 commit2f02d4a
File tree
3 files changed
+80
-0
lines changed- src
- backend/utils/fmgr
- test/regress
- expected
- sql
3 files changed
+80
-0
lines changedLines changed: 32 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
239 | 271 |
| |
240 | 272 |
| |
241 | 273 |
| |
|
Lines changed: 39 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
445 | 445 |
| |
446 | 446 |
| |
447 | 447 |
| |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
448 | 487 |
| |
449 | 488 |
| |
450 | 489 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
179 | 188 |
| |
180 | 189 |
| |
181 | 190 |
| |
|
0 commit comments
Comments
(0)