mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Rename shadowed local variables
In a similar effort to f01592f91
, here we mostly rename shadowed local
variables to remove the warnings produced when compiling with
-Wshadow=compatible-local.
This fixes 63 warnings and leaves just 5.
Author: Justin Pryzby, David Rowley
Reviewed-by: Justin Pryzby
Discussion https://postgr.es/m/20220817145434.GC26426%40telsasoft.com
This commit is contained in:
@ -10223,7 +10223,7 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
|
||||
Oid constrOid;
|
||||
ObjectAddress address,
|
||||
referenced;
|
||||
ListCell *cell;
|
||||
ListCell *lc;
|
||||
Oid insertTriggerOid,
|
||||
updateTriggerOid;
|
||||
|
||||
@ -10276,9 +10276,9 @@ CloneFkReferencing(List **wqueue, Relation parentRel, Relation partRel)
|
||||
* don't need to recurse to partitions for this constraint.
|
||||
*/
|
||||
attached = false;
|
||||
foreach(cell, partFKs)
|
||||
foreach(lc, partFKs)
|
||||
{
|
||||
ForeignKeyCacheInfo *fk = lfirst_node(ForeignKeyCacheInfo, cell);
|
||||
ForeignKeyCacheInfo *fk = lfirst_node(ForeignKeyCacheInfo, lc);
|
||||
|
||||
if (tryAttachPartitionForeignKey(fk,
|
||||
RelationGetRelid(partRel),
|
||||
@ -10877,7 +10877,7 @@ ATExecAlterConstrRecurse(Constraint *cmdcon, Relation conrel, Relation tgrel,
|
||||
{
|
||||
Form_pg_trigger tgform = (Form_pg_trigger) GETSTRUCT(tgtuple);
|
||||
Form_pg_trigger copy_tg;
|
||||
HeapTuple copyTuple;
|
||||
HeapTuple tgCopyTuple;
|
||||
|
||||
/*
|
||||
* Remember OIDs of other relation(s) involved in FK constraint.
|
||||
@ -10901,16 +10901,16 @@ ATExecAlterConstrRecurse(Constraint *cmdcon, Relation conrel, Relation tgrel,
|
||||
tgform->tgfoid != F_RI_FKEY_CHECK_UPD)
|
||||
continue;
|
||||
|
||||
copyTuple = heap_copytuple(tgtuple);
|
||||
copy_tg = (Form_pg_trigger) GETSTRUCT(copyTuple);
|
||||
tgCopyTuple = heap_copytuple(tgtuple);
|
||||
copy_tg = (Form_pg_trigger) GETSTRUCT(tgCopyTuple);
|
||||
|
||||
copy_tg->tgdeferrable = cmdcon->deferrable;
|
||||
copy_tg->tginitdeferred = cmdcon->initdeferred;
|
||||
CatalogTupleUpdate(tgrel, ©Tuple->t_self, copyTuple);
|
||||
CatalogTupleUpdate(tgrel, &tgCopyTuple->t_self, tgCopyTuple);
|
||||
|
||||
InvokeObjectPostAlterHook(TriggerRelationId, tgform->oid, 0);
|
||||
|
||||
heap_freetuple(copyTuple);
|
||||
heap_freetuple(tgCopyTuple);
|
||||
}
|
||||
|
||||
systable_endscan(tgscan);
|
||||
@ -18083,14 +18083,14 @@ AttachPartitionEnsureIndexes(Relation rel, Relation attachrel)
|
||||
if (!found)
|
||||
{
|
||||
IndexStmt *stmt;
|
||||
Oid constraintOid;
|
||||
Oid conOid;
|
||||
|
||||
stmt = generateClonedIndexStmt(NULL,
|
||||
idxRel, attmap,
|
||||
&constraintOid);
|
||||
&conOid);
|
||||
DefineIndex(RelationGetRelid(attachrel), stmt, InvalidOid,
|
||||
RelationGetRelid(idxRel),
|
||||
constraintOid,
|
||||
conOid,
|
||||
true, false, false, false, false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user