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

Commit038a2ed

Browse files
committed
Stabilize regression test result.
If random() returns a result sufficiently close to zero, float8outswitches to scientific notation, breaking this test case's expectationthat the output should look like '0.xxxxxxxxx'. Casting to numericshould fix that. Per buildfarm member pogona.Discussion:https://postgr.es/m/20180324212502.wt4serghfidge2on@alap3.anarazel.de
1 parentda61695 commit038a2ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LINE 1: SELECT ptest1('x');
2222
HINT: To call a procedure, use CALL.
2323
CALL ptest1('a'); -- ok
2424
CALL ptest1('xy' || 'zzy'); -- ok, constant-folded arg
25-
CALL ptest1(substring(random()::text, 1, 1)); -- ok, volatile arg
25+
CALL ptest1(substring(random()::numeric(20,15)::text, 1, 1)); -- ok, volatile arg
2626
\df ptest1
2727
List of functions
2828
Schema | Name | Result data type | Argument data types | Type

‎src/test/regress/sql/create_procedure.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $$;
1414
SELECT ptest1('x');-- error
1515
CALL ptest1('a');-- ok
1616
CALL ptest1('xy'||'zzy');-- ok, constant-folded arg
17-
CALL ptest1(substring(random()::text,1,1));-- ok, volatile arg
17+
CALL ptest1(substring(random()::numeric(20,15)::text,1,1));-- ok, volatile arg
1818

1919
\df ptest1
2020
SELECT pg_get_functiondef('ptest1'::regproc);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp