From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add SHELL_ERROR and SHELL_EXIT_CODE magic variables to psql.
Date: Tue, 21 Mar 2023 17:04:06 +0000
Message-ID: <E1pefP4-004gIr-4O@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add SHELL_ERROR and SHELL_EXIT_CODE magic variables to psql.
In-Reply-To: <E1pefP4-004gIr-4O@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox