summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2018-03-25 04:09:26 +0000
committerTom Lane2018-03-25 04:09:26 +0000
commit038a2ed1392363a59adeee4e86d848ca74ce39c5 (patch)
tree5f8a793ce663a5c7a36a90475b268795bf5fdbc5
parentda616950cee395919f835b5cbec3d23c4844015a (diff)
Stabilize regression test result.
If random() returns a result sufficiently close to zero, float8out switches to scientific notation, breaking this test case's expectation that the output should look like '0.xxxxxxxxx'. Casting to numeric should fix that. Per buildfarm member pogona. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/test/regress/expected/create_procedure.out2
-rw-r--r--src/test/regress/sql/create_procedure.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/expected/create_procedure.out b/src/test/regress/expected/create_procedure.out
index dacb657706..66cdad760c 100644
--- a/src/test/regress/expected/create_procedure.out
+++ b/src/test/regress/expected/create_procedure.out
@@ -22,7 +22,7 @@ LINE 1: SELECT ptest1('x');
HINT: To call a procedure, use CALL.
CALL ptest1('a'); -- ok
CALL ptest1('xy' || 'zzy'); -- ok, constant-folded arg
-CALL ptest1(substring(random()::text, 1, 1)); -- ok, volatile arg
+CALL ptest1(substring(random()::numeric(20,15)::text, 1, 1)); -- ok, volatile arg
\df ptest1
List of functions
Schema | Name | Result data type | Argument data types | Type
diff --git a/src/test/regress/sql/create_procedure.sql b/src/test/regress/sql/create_procedure.sql
index a6a935f578..1be9c6fd78 100644
--- a/src/test/regress/sql/create_procedure.sql
+++ b/src/test/regress/sql/create_procedure.sql
@@ -14,7 +14,7 @@ $$;
SELECT ptest1('x'); -- error
CALL ptest1('a'); -- ok
CALL ptest1('xy' || 'zzy'); -- ok, constant-folded arg
-CALL ptest1(substring(random()::text, 1, 1)); -- ok, volatile arg
+CALL ptest1(substring(random()::numeric(20,15)::text, 1, 1)); -- ok, volatile arg
\df ptest1
SELECT pg_get_functiondef('ptest1'::regproc);