Numeric output is not showed correctly
Opened this issue · 10 comments
I didn't found any relevant commit that could change that behaivour, just this one: #591
Formatting in pgcli is done by tabulate
. Pgcli keeps its own slightly tweaked version of tabulate here. Tabulate tries to be smart about formatting numbers.
>>> print tabulate.tabulate([['x'], [1.00000000]], headers='firstrow')[0]
x
---
1
Thank you, @j-bennet, I'll give it a check.
I'm not sure what the good solution is here, have to think about it. In a lot of cases, "simplifying" numbers like tabulate does is a good thing, but not when you explicitly format it to certain precision.
Maybe putting an option in the configuration file to turn off numeric_simplification.
Also, it would be nice to have a bullet about this simplification in the features section.
Just spend a couple of hours trying to figure out why values become rounded. This option (or at least explicitly explain this behaviour on README.md) could be helpful!
👍 thanks!
Hi, I got to this issue from the readme, where I'm guessing it shouldn't be mentioned anymore...