summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2022-09-02 13:57:11 -0700
committerGitHub <noreply@github.com>2022-09-02 13:57:11 -0700
commitabc03c509fe8faae546eaf76a37ef47389ecbecc (patch)
tree470e3f3676e6695c3c69abfd22ee3d9e174cf2eb
parentf858c4d569d6e364a8145def03bac023d03a8204 (diff)
parent318cdb94f0969716cfdf142ea85dbb6acd37879b (diff)
Merge pull request #1341 from dbcli/fix-csv-status
Show status in csv format.
-rw-r--r--changelog.rst2
-rw-r--r--pgcli/main.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/changelog.rst b/changelog.rst
index 11af3167..952583eb 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -21,6 +21,8 @@ Bug fixes:
----------
* Fix the bug with Redshift not displaying word count in status ([related issue](https://github.com/dbcli/pgcli/issues/1320)).
+* Show the error status for CSV output format.
+
3.4.0 (2022/02/21)
==================
diff --git a/pgcli/main.py b/pgcli/main.py
index 856e5286..3d42dca8 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -1585,8 +1585,8 @@ def format_output(title, cur, headers, status, settings, explain_mode=False):
output = itertools.chain(output, formatted)
- # Only print the status if it's not None and we are not producing CSV
- if status and table_format != "csv":
+ # Only print the status if it's not None
+ if status:
output = itertools.chain(output, [format_status(cur, status)])
return output