Conversation
-t/--tuples-only already turns off the timing line and the status footer, but it also drops the headers, the title and the table formatting. Scripts that post-process pgcli output often want the table intact and only one of the two footers gone, and there was no way to ask for that. The two flags are independent of each other and of -t, which keeps working as the psql-compatible shorthand for both. 8 tests, 2 of which fail if the flags are wired to -t instead of standing on their own.
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.
This is item 11 of #1603.
Description
-t/--tuples-onlyalready turns off the timing line and the status footer, but it also drops the column headers, the title and the table formatting, because it matchespsql -t. There is currently no way to keep the table intact and suppress only one of the two footers.That combination is what scripts tend to want.
--no-timingsalone keeps the status footer, so a wrapper can still readUPDATE 12back;--no-statusalone keeps the timing line, which is handy when timing a query whose output you are eyeballing. Both are off by default, so nothing changes for anyone who does not pass them.The two flags are independent of each other and of
-t, which keeps working as the shorthand for both:Implementation is small:
--no-timingsreuses thepgspecial.timing_enabledswitch that-talready flips, and--no-statusadds ashow_statusfield toOutputSettingsthatformat_output()checks next to the existingtuples_onlycheck.8 tests. Two of them fail if the flags are wired to
-trather than standing on their own, which was the mistake worth pinning down.Checklist
changelog.rst.AUTHORSfile (or it is already there).pip install pre-commit && pre-commit install).On the third box:
.pre-commit-config.yamlpinsruff-pre-commitatv0.11.7whiletox -e styleinstallsruffunpinned (0.15.x today), and the two disagree on formatting, so the hook reformats code that the style job then wants reformatted back. I ranruff checkandruff formatmatching the CI instead, both clean.