Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e9d6934

Browse files
committed
Add a regression test to verify that the stack depth checker actually
works (and max_stack_depth is not set too high for the platform). Inspired by trouble report from Brian Betts.
1 parent 49c320b commit e9d6934

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/regress/expected/errors.out

+7
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,10 @@ NULL);
441441
ERROR: syntax error at or near "NUL" at character 190
442442
LINE 16: ...L, id2 TEXT NOT NULL PRIMARY KEY, id3 INTEGER NOT NUL, id4 I...
443443
^
444+
-- Check that stack depth detection mechanism works and
445+
-- max_stack_depth is not set too high
446+
create function infinite_recurse() returns int as
447+
'select infinite_recurse()' language sql;
448+
\set VERBOSITY terse
449+
select infinite_recurse();
450+
ERROR: stack depth limit exceeded

src/test/regress/sql/errors.sql

+7
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,10 @@ INT4
367367
UNIQUE
368368
NOT
369369
NULL);
370+
371+
-- Check that stack depth detection mechanism works and
372+
-- max_stack_depth is not set too high
373+
create function infinite_recurse() returns int as
374+
'select infinite_recurse()' language sql;
375+
\set VERBOSITY terse
376+
select infinite_recurse();

0 commit comments

Comments
 (0)