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

Commit 8e28778

Browse files
committed
Add missing RestrictSearchPath() calls.
Reported-by: Noah Misch Backpatch-through: 17 Discussion: https://postgr.es/m/20240630222344.db.nmisch@google.com
1 parent c8a6ec2 commit 8e28778

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/commands/indexcmds.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ DefineIndex(Oid tableId,
12301230
*/
12311231
AtEOXact_GUC(false, root_save_nestlevel);
12321232
root_save_nestlevel = NewGUCNestLevel();
1233+
RestrictSearchPath();
12331234

12341235
/* Add any requested comment */
12351236
if (stmt->idxcomment != NULL)
@@ -2027,6 +2028,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo,
20272028
{
20282029
SetUserIdAndSecContext(save_userid, save_sec_context);
20292030
*ddl_save_nestlevel = NewGUCNestLevel();
2031+
RestrictSearchPath();
20302032
}
20312033
}
20322034

@@ -2074,6 +2076,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo,
20742076
{
20752077
SetUserIdAndSecContext(save_userid, save_sec_context);
20762078
*ddl_save_nestlevel = NewGUCNestLevel();
2079+
RestrictSearchPath();
20772080
}
20782081

20792082
/*
@@ -2104,6 +2107,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo,
21042107
{
21052108
SetUserIdAndSecContext(save_userid, save_sec_context);
21062109
*ddl_save_nestlevel = NewGUCNestLevel();
2110+
RestrictSearchPath();
21072111
}
21082112

21092113
/*

0 commit comments

Comments
 (0)