Commit 0abc8fdd authored by Tom Lane's avatar Tom Lane

Reduce recursion depth in recently-added regression test.

Some buildfarm members fail the test with the original depth of 10 levels,
apparently because they are running at the minimum max_stack_depth setting
of 100kB and using ~ 10k per recursion level.  While it might be
interesting to try to figure out why they're eating so much stack, it isn't
likely that any fix for that would be back-patchable.  So just change the
test to recurse only 5 levels.  The extra levels don't prove anything
correctness-wise anyway.
parent 70a0160b
......@@ -3996,8 +3996,8 @@ DROP FUNCTION nonsimple_expr_test();
create function recurse(float8) returns float8 as
$$
begin
if ($1 < 10) then
return sql_recurse($1 + 1);
if ($1 > 0) then
return sql_recurse($1 - 1);
else
return $1;
end if;
......@@ -4006,10 +4006,10 @@ $$ language plpgsql;
-- "limit" is to prevent this from being inlined
create function sql_recurse(float8) returns float8 as
$$ select recurse($1) limit 1; $$ language sql;
select recurse(0);
select recurse(5);
recurse
---------
10
0
(1 row)
create function error1(text) returns text language sql as
......
......@@ -3199,8 +3199,8 @@ DROP FUNCTION nonsimple_expr_test();
create function recurse(float8) returns float8 as
$$
begin
if ($1 < 10) then
return sql_recurse($1 + 1);
if ($1 > 0) then
return sql_recurse($1 - 1);
else
return $1;
end if;
......@@ -3211,7 +3211,7 @@ $$ language plpgsql;
create function sql_recurse(float8) returns float8 as
$$ select recurse($1) limit 1; $$ language sql;
select recurse(0);
select recurse(5);
create function error1(text) returns text language sql as
$$ SELECT relname::text FROM pg_class c WHERE c.oid = $1::regclass $$;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment