Describe the bug
When storing numbers with trailing zeros in jsonb, postgres will preserve those those:
However, jsonb will preserve trailing fractional zeroes, as seen in this example, even though those are semantically insignificant for purposes such as equality checks.
However when I open such a jsonb document in pgadmin 4, the trailing zeros will not show in the edit window. This means that opening such a document, editing it and saving it via pgadmin will strip trailing zeros of numbers that weren't modified, which can break the appliation.
To Reproduce
In the row view it shows 10.00, but double clicking the field to open the pretty-printed json-editor view will replace it by 10.
Expected behavior
Preserve the trailing zeros, so that round-tripping a json document through the json editor doesn't modify data.
Screenshots
Desktop
- OS: Freedesktop SDK 24.08 (Flatpak runtime), Linux-6.18.18-1-MANJARO-x86_64-with-glibc2.40
- pgAdmin version: 9.14
- Mode: Desktop
- Browser: Chrome 146.0.7680.166
- Package type: Flatpak
Describe the bug
When storing numbers with trailing zeros in jsonb, postgres will preserve those those:
However when I open such a jsonb document in pgadmin 4, the trailing zeros will not show in the edit window. This means that opening such a document, editing it and saving it via pgadmin will strip trailing zeros of numbers that weren't modified, which can break the appliation.
To Reproduce
In the row view it shows
10.00, but double clicking the field to open the pretty-printed json-editor view will replace it by10.Expected behavior
Preserve the trailing zeros, so that round-tripping a json document through the json editor doesn't modify data.
Screenshots
Desktop