Re: Add SHELL_EXIT_CODE to psql - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Add SHELL_EXIT_CODE to psql
Date
Msg-id CADkLM=eo2uaeDN_E_sf_jHn5x02_FNnjx0P+5m=EP22mEy_JKg@mail.gmail.com
Whole thread Raw
In response to Re: Add SHELL_EXIT_CODE to psql  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Add SHELL_EXIT_CODE to psql
List pgsql-hackers
On Fri, Mar 24, 2023 at 5:21 PM Corey Huinker <corey.huinker@gmail.com> wrote:


On Tue, Mar 21, 2023 at 3:33 PM Corey Huinker <corey.huinker@gmail.com> wrote:

As you had it, any nonzero result would prevent backtick substitution.
I'm not really sure how much thought went into the existing behavior,
but I am pretty sure that it's not part of this patch's charter to
change that.

                        regards, tom lane

 The changes all make sense, thanks!

This is a follow up patch to apply the committed pattern to the various piped output commands.

I spotted this oversight in the https://www.postgresql.org/message-id/CADkLM=dMG6AAWfeKvGnKOzz1O7ZNctFR1BzAA3K7-+XQxff=4Q@mail.gmail.com thread and, whether or not that feature gets in, we should probably apply it to output pipes as well.

Following up here. This addendum patch clearly isn't as important as anything currently trying to make it in before the feature freeze, but I think the lack of setting the SHELL_ERROR and SHELL_EXIT_CODE vars on piped commands would be viewed as a bug, so I'm hoping somebody can take a look at it.
 

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert
Next
From: Jacob Champion
Date:
Subject: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert