Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d61b99

Browse files
committed
to_char(float4/8): don't print "junk" digits
Commitcc0d90b also avoids printingjunk digits, which are digits that are beyond the precision of theunderlying type.
1 parentcc0d90b commit9d61b99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/test/regress/expected/numeric.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ SELECT to_char(float8 '1.123456789123456789', '9.' || repeat('9', 55));
15391539
(1 row)
15401540

15411541
SELECT to_char(float8 '1999999999999999999999999999999999999999999999.123456789123456789',
1542-
repeat('9', 50) || '.' || repeat('9', 50));
1542+
repeat('9', 50) || '.' || repeat('9', 50));
15431543
to_char
15441544
--------------------------------------------------------------------------------------------------------
15451545
1999999999999990000000000000000000000000000000.00000000000000000000000000000000000000000000000000

‎src/test/regress/sql/numeric.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ SELECT to_char(float8 '1e20','999999999999999999999D9');
870870
SELECT to_char(1e20,'999999999999999999999D9');
871871
SELECT to_char(float8'1.123456789123456789','9.'|| repeat('9',55));
872872
SELECT to_char(float8'1999999999999999999999999999999999999999999999.123456789123456789',
873-
repeat('9',50)||'.'|| repeat('9',50));
873+
repeat('9',50)||'.'|| repeat('9',50));
874874
SELECT to_char(float8'0.1','9D'|| repeat('9',1000));
875875
SELECT to_char(int4'1','9D'|| repeat('9',1000)||'EEEE');
876876
SELECT to_char(float4'1','9D'|| repeat('9',1000)||'EEEE');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp