Commit b0d8f2d
committed
Add SHELL_ERROR and SHELL_EXIT_CODE magic variables to psql.
These are set after a \! command or a backtick substitution.
SHELL_ERROR is just "true" for error (nonzero exit status) or "false"
for success, while SHELL_EXIT_CODE records the actual exit status
following standard shell/system(3) conventions.
Corey Huinker, reviewed by Maxim Orlov and myself
Discussion: https://postgr.es/m/CADkLM=cWao2x2f+UDw15W1JkVFr_bsxfstw=NGea7r9m4j-7rQ@mail.gmail.com1 parent 0f85db9 commit b0d8f2d
File tree
6 files changed
+88
-3
lines changed- doc/src/sgml/ref
- src
- bin/psql
- common
- include
6 files changed
+88
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4267 | 4267 | | |
4268 | 4268 | | |
4269 | 4269 | | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
4270 | 4298 | | |
4271 | 4299 | | |
4272 | 4300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5041 | 5041 | | |
5042 | 5042 | | |
5043 | 5043 | | |
| 5044 | + | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
5044 | 5059 | | |
5045 | 5060 | | |
5046 | 5061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
772 | 774 | | |
773 | 775 | | |
774 | 776 | | |
| 777 | + | |
775 | 778 | | |
776 | 779 | | |
777 | 780 | | |
| |||
783 | 786 | | |
784 | 787 | | |
785 | 788 | | |
| 789 | + | |
786 | 790 | | |
787 | 791 | | |
788 | 792 | | |
| |||
800 | 804 | | |
801 | 805 | | |
802 | 806 | | |
803 | | - | |
| 807 | + | |
804 | 808 | | |
805 | | - | |
806 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
807 | 820 | | |
808 | 821 | | |
809 | 822 | | |
| |||
826 | 839 | | |
827 | 840 | | |
828 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
829 | 847 | | |
830 | 848 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| 498 | + | |
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| |||
0 commit comments