| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add SHELL_ERROR and SHELL_EXIT_CODE magic variables to psql. |
| Date: | 2023-03-21 17:04:06 |
| Message-ID: | E1pefP4-004gIr-4O@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b0d8f2d983cb25d1035fae1cd7de214dd67809b4
Modified Files
--------------
doc/src/sgml/ref/psql-ref.sgml | 28 ++++++++++++++++++++++++++++
src/bin/psql/command.c | 15 +++++++++++++++
src/bin/psql/help.c | 4 ++++
src/bin/psql/psqlscanslash.l | 24 +++++++++++++++++++++---
src/common/wait_error.c | 19 +++++++++++++++++++
src/include/port.h | 1 +
6 files changed, 88 insertions(+), 3 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2023-03-21 19:45:21 | pgsql: Correct Memoize's estimated cache hit ratio calculation |
| Previous Message | Daniel Gustafsson | 2023-03-21 16:39:18 | pgsql: docs: use consistent markup for PostgreSQL |