Commit 31ae2aa
committed
psql: set SHELL_ERROR and SHELL_EXIT_CODE in more places.
Make the \g, \o, \w, and \copy commands set these variables
when closing a pipe. We missed doing this in commit b0d8f2d,
but it seems like a good idea.
There are some remaining places in psql that intentionally don't
update these variables after running a child program:
* pager invocations
* backtick evaluation within a prompt
* \e (edit query buffer)
Corey Huinker and Tom Lane
Discussion: https://postgr.es/m/CADkLM=eSKwRGF-rnRqhtBORRtL49QsjcVUCa-kLxKTqxypsakw@mail.gmail.com1 parent 029dea8 commit 31ae2aa
File tree
6 files changed
+44
-27
lines changed- doc/src/sgml/ref
- src/bin/psql
6 files changed
+44
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4277 | 4277 | | |
4278 | 4278 | | |
4279 | 4279 | | |
4280 | | - | |
4281 | | - | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
4282 | 4286 | | |
4283 | 4287 | | |
4284 | 4288 | | |
| |||
4292 | 4296 | | |
4293 | 4297 | | |
4294 | 4298 | | |
4295 | | - | |
4296 | | - | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
| 4302 | + | |
| 4303 | + | |
| 4304 | + | |
4297 | 4305 | | |
4298 | 4306 | | |
4299 | 4307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2734 | 2734 | | |
2735 | 2735 | | |
2736 | 2736 | | |
| 2737 | + | |
2737 | 2738 | | |
2738 | 2739 | | |
2739 | 2740 | | |
| |||
5119 | 5120 | | |
5120 | 5121 | | |
5121 | 5122 | | |
5122 | | - | |
5123 | | - | |
5124 | | - | |
5125 | | - | |
5126 | | - | |
5127 | | - | |
5128 | | - | |
5129 | | - | |
5130 | | - | |
5131 | | - | |
5132 | | - | |
5133 | | - | |
5134 | | - | |
5135 | | - | |
| 5123 | + | |
5136 | 5124 | | |
5137 | 5125 | | |
5138 | 5126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
452 | 472 | | |
453 | 473 | | |
454 | 474 | | |
| |||
1652 | 1672 | | |
1653 | 1673 | | |
1654 | 1674 | | |
1655 | | - | |
| 1675 | + | |
1656 | 1676 | | |
1657 | 1677 | | |
1658 | 1678 | | |
| |||
1870 | 1890 | | |
1871 | 1891 | | |
1872 | 1892 | | |
1873 | | - | |
| 1893 | + | |
1874 | 1894 | | |
1875 | 1895 | | |
1876 | 1896 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
810 | | - | |
| 810 | + | |
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
| |||
839 | 839 | | |
840 | 840 | | |
841 | 841 | | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
| 842 | + | |
| 843 | + | |
846 | 844 | | |
847 | 845 | | |
848 | 846 | | |
0 commit comments