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

Commit95dcb8f

Browse files
committed
Avoid locale-dependent output in numericlocale check.
I'd forgotten that in the buildfarm, parts of the regression testsmay run with psql exposed to a non-default LC_NUMERIC setting.Hence we can't assume that C locale prevails, nor is there anyaccessible way to force the setting for this single test step.Lobotomize the test case added by commit9a98984 so that it covers asmuch as we can of print.c without having any locale-varying output.
1 parent67ed3b9 commit95dcb8f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,18 +2773,18 @@ Argument data types | numeric
27732773
Type | func
27742774

27752775
\pset tuples_only false
2776-
-- test numericlocale (not too interesting in C locale, but ...)
2776+
-- test numericlocale (as best we can without control of psql's locale)
27772777
\pset format aligned
27782778
\pset expanded off
27792779
\pset numericlocale true
2780-
select n, -n as m, n *1000 +111.1111 as x, '1e90'::float8 as f
2780+
select n, -n as m, n * 111 as x, '1e90'::float8 as f
27812781
from generate_series(0,3) n;
2782-
n | m | x | f
2783-
---+----+------------+-------
2784-
0 | 0 |111.1111 | 1e+90
2785-
1 | -1 |1,111.1111 | 1e+90
2786-
2 | -2 |2,111.1111 | 1e+90
2787-
3 | -3 |3,111.1111 | 1e+90
2782+
n | m |x | f
2783+
---+----+-----+-------
2784+
0 | 0 |0 | 1e+90
2785+
1 | -1 | 111 | 1e+90
2786+
2 | -2 |222 | 1e+90
2787+
3 | -3 |333 | 1e+90
27882788
(4 rows)
27892789

27902790
\pset numericlocale false

‎src/test/regress/sql/psql.sql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,13 @@ select 1 where false;
448448
\df exp
449449
\pset tuples_only false
450450

451-
-- test numericlocale (not too interesting in C locale, but ...)
451+
-- test numericlocale (as best we can without control of psql's locale)
452452

453453
\pset format aligned
454454
\pset expanded off
455455
\pset numericlocale true
456456

457-
select n,-nas m, n*1000+111.1111as x,'1e90'::float8as f
457+
select n,-nas m, n*111as x,'1e90'::float8as f
458458
from generate_series(0,3) n;
459459

460460
\pset numericlocale false

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp