-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit 1bf2518
committed
Fix EXIT out of outermost block in plpgsql.
Ordinarily, using EXIT this way would draw "control reached end of
function without RETURN". However, if the function is one where we
don't require an explicit RETURN (such as a DO block), that should
not happen. It did anyway, because add_dummy_return() neglected to
account for the case.
Per report from Herwig Goemans. Back-patch to all supported branches.
Discussion: https://postgr.es/m/868ae948-e3ca-c7ec-95a6-83cfc08ef750@gmail.com1 parent df3640e commit 1bf2518Copy full SHA for 1bf2518
File tree
Expand file treeCollapse file tree
3 files changed
+27
-2
lines changedFilter options
- src/pl/plpgsql/src
- expected
- sql
Expand file treeCollapse file tree
3 files changed
+27
-2
lines changedsrc/pl/plpgsql/src/expected/plpgsql_control.out
Copy file name to clipboardExpand all lines: src/pl/plpgsql/src/expected/plpgsql_control.out+11Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
413 | 413 |
| |
414 | 414 |
| |
415 | 415 |
| |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
416 | 427 |
| |
417 | 428 |
| |
418 | 429 |
| |
|
src/pl/plpgsql/src/pl_comp.c
Copy file name to clipboardExpand all lines: src/pl/plpgsql/src/pl_comp.c+4-2Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1038 | 1038 |
| |
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 |
| - | |
| 1041 | + | |
| 1042 | + | |
1042 | 1043 |
| |
1043 |
| - | |
| 1044 | + | |
| 1045 | + | |
1044 | 1046 |
| |
1045 | 1047 |
| |
1046 | 1048 |
| |
|
src/pl/plpgsql/src/sql/plpgsql_control.sql
Copy file name to clipboardExpand all lines: src/pl/plpgsql/src/sql/plpgsql_control.sql+12Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
314 | 326 |
| |
315 | 327 |
| |
316 | 328 |
| |
|
0 commit comments