diff options
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 6aa7e559087..2c7e7a584fc 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -22,6 +22,7 @@ #include "postgres.h" +#include "miscadmin.h" #include "nodes/plannodes.h" #include "nodes/relation.h" #include "utils/datum.h" @@ -2794,6 +2795,9 @@ copyObject(void *from) if (from == NULL) return NULL; + /* Guard against stack overflow due to overly complex expressions */ + check_stack_depth(); + switch (nodeTag(from)) { /* |