|
|
@ -7035,6 +7035,9 @@ ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel, |
|
|
|
ObjectAddress address; |
|
|
|
ObjectAddress address; |
|
|
|
TupleDesc tupdesc; |
|
|
|
TupleDesc tupdesc; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* since this function recurses, it could be driven to stack overflow */ |
|
|
|
|
|
|
|
check_stack_depth(); |
|
|
|
|
|
|
|
|
|
|
|
/* At top level, permission check was done in ATPrepCmd, else do it */ |
|
|
|
/* At top level, permission check was done in ATPrepCmd, else do it */ |
|
|
|
if (recursing) |
|
|
|
if (recursing) |
|
|
|
ATSimplePermissions((*cmd)->subtype, rel, ATT_TABLE | ATT_FOREIGN_TABLE); |
|
|
|
ATSimplePermissions((*cmd)->subtype, rel, ATT_TABLE | ATT_FOREIGN_TABLE); |
|
|
@ -9083,6 +9086,10 @@ ATExecDropColumn(List **wqueue, Relation rel, const char *colName, |
|
|
|
|
|
|
|
|
|
|
|
/* Initialize addrs on the first invocation */ |
|
|
|
/* Initialize addrs on the first invocation */ |
|
|
|
Assert(!recursing || addrs != NULL); |
|
|
|
Assert(!recursing || addrs != NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* since this function recurses, it could be driven to stack overflow */ |
|
|
|
|
|
|
|
check_stack_depth(); |
|
|
|
|
|
|
|
|
|
|
|
if (!recursing) |
|
|
|
if (!recursing) |
|
|
|
addrs = new_object_addresses(); |
|
|
|
addrs = new_object_addresses(); |
|
|
|
|
|
|
|
|
|
|
@ -11636,6 +11643,9 @@ ATExecAlterConstrRecurse(Constraint *cmdcon, Relation conrel, Relation tgrel, |
|
|
|
Oid refrelid; |
|
|
|
Oid refrelid; |
|
|
|
bool changed = false; |
|
|
|
bool changed = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* since this function recurses, it could be driven to stack overflow */ |
|
|
|
|
|
|
|
check_stack_depth(); |
|
|
|
|
|
|
|
|
|
|
|
currcon = (Form_pg_constraint) GETSTRUCT(contuple); |
|
|
|
currcon = (Form_pg_constraint) GETSTRUCT(contuple); |
|
|
|
conoid = currcon->oid; |
|
|
|
conoid = currcon->oid; |
|
|
|
refrelid = currcon->confrelid; |
|
|
|
refrelid = currcon->confrelid; |
|
|
@ -12716,6 +12726,9 @@ dropconstraint_internal(Relation rel, HeapTuple constraintTup, DropBehavior beha |
|
|
|
/* Guard against stack overflow due to overly deep inheritance tree. */ |
|
|
|
/* Guard against stack overflow due to overly deep inheritance tree. */ |
|
|
|
check_stack_depth(); |
|
|
|
check_stack_depth(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* since this function recurses, it could be driven to stack overflow */ |
|
|
|
|
|
|
|
check_stack_depth(); |
|
|
|
|
|
|
|
|
|
|
|
/* At top level, permission check was done in ATPrepCmd, else do it */ |
|
|
|
/* At top level, permission check was done in ATPrepCmd, else do it */ |
|
|
|
if (recursing) |
|
|
|
if (recursing) |
|
|
|
ATSimplePermissions(AT_DropConstraint, rel, ATT_TABLE | ATT_FOREIGN_TABLE); |
|
|
|
ATSimplePermissions(AT_DropConstraint, rel, ATT_TABLE | ATT_FOREIGN_TABLE); |
|
|
|