Add functions min_scale(numeric) and trim_scale(numeric).
Tom Lane <tgl@sss.pgh.pa.us>
Add functions min_scale(numeric) and trim_scale(numeric). These allow better control of trailing zeroes in numeric values. Pavel Stehule, based on an old proposal of Marko Tiikkaja's; review by Karl Pinc Discussion: https://postgr.es/m/CAFj8pRDjs-navGASeF0Wk74N36YGFJ+v=Ok9_knRa7vDc-qugg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +30 −2 |
| src/backend/utils/adt/numeric.c | modified | +91 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +7 −0 |
| src/test/regress/expected/numeric.out | modified | +126 −0 |
| src/test/regress/sql/numeric.sql | modified | +30 −0 |
Documentation touched
Discussion
- proposal: minscale, rtrim, btrim functions for numeric 19 messages · 2019-11-09 → 2020-01-06