Form_pg_attribute attForm;
bool retval = false;
+ /* Guard against stack overflow due to overly deep inheritance tree. */
+ check_stack_depth();
+
tuple = SearchSysCacheCopyAttNum(RelationGetRelid(rel), attnum);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for attribute %d of relation %u",
bool is_no_inherit = false;
List *ready = NIL;
+ /* Guard against stack overflow due to overly deep inheritance tree. */
+ check_stack_depth();
+
/*
* In cases of multiple inheritance, we might visit the same child more
* than once. In the topmost call, set up a list that we fill with all
ListCell *child;
ObjectAddress address = InvalidObjectAddress;
+ /* Guard against stack overflow due to overly deep inheritance tree. */
+ check_stack_depth();
+
/* At top level, permission check was done in ATPrepCmd, else do it */
if (recursing)
ATSimplePermissions(AT_AddConstraint, rel, ATT_TABLE | ATT_FOREIGN_TABLE);
return InvalidObjectAddress;
*readyRels = lappend_oid(*readyRels, RelationGetRelid(rel));
+ /* Guard against stack overflow due to overly deep inheritance tree. */
+ check_stack_depth();
+
/* At top level, permission check was done in ATPrepCmd, else do it */
if (recursing)
ATSimplePermissions(AT_DropConstraint, rel, ATT_TABLE | ATT_FOREIGN_TABLE);