pgsql: to_char(float4/8): zero pad to specified length

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: to_char(float4/8): zero pad to specified length
Date: 2015-03-22 01:43:54
Message-ID: E1YZUvi-0001k8-Id@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

to_char(float4/8): zero pad to specified length

Previously, zero padding was limited to the internal length, rather than
the specified length. This allows it to match to_char(int/numeric), which
always padded to the specified length.

Regression tests added.

BACKWARD INCOMPATIBILITY

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cc0d90b73b2e6dd2f301d46818a7265742c41a14

Modified Files
--------------
src/backend/utils/adt/formatting.c | 114 ++++++++++++++++++++++-----------
src/test/regress/expected/numeric.out | 70 ++++++++++++++++++++
src/test/regress/expected/window.out | 2 +-
src/test/regress/sql/numeric.sql | 17 +++++
4 files changed, 163 insertions(+), 40 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2015-03-22 01:50:08 pgsql: to_char(float4/8): don't print "junk" digits
Previous Message Michael Paquier 2015-03-21 11:08:15 Re: pgsql: vacuumdb: enable parallel mode