Repository navigation
Conversation
The error of a failed statement is printed in the status footer's place, and -t suppresses that footer, so with -t a broken query printed nothing at all. For example `pgcli -t -c "select nope"` gives no output and exits 0, where `psql -t -c "select nope"` prints the error on stderr. Under -t the error now goes to stderr, so stdout still carries only rows, as with psql -t. Output without -t is unchanged. Tested against a live server: a pytest that fails without the change (the error reaches stderr and not the rows), a guard that a good query under -t writes nothing to stderr, and a behave scenario that runs pgcli -t -c with stdout and stderr captured apart.
DiegoDAF
added a commit
to DiegoDAF/pgcli.daf
that referenced
this pull request
Oct 14, 2026
DiegoDAF
added a commit
to DiegoDAF/pgcli.daf
that referenced
this pull request
Oct 14, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With -t a failed statement prints nothing at all. The error is printed in place of the status footer, and -t suppresses that footer:
Under -t the error now goes to stderr, so stdout still carries only rows, as with psql -t. Output without -t is unchanged.
Tests: a pytest against a live server that fails without the change, a guard that a good query under -t writes nothing to stderr, and a behave scenario that runs
pgcli -t -cwith stdout and stderr captured apart (there was no behave coverage of -t yet).The exit status of -c on a failed statement (0, where psql exits 1) is left for a separate change.