summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/copyfrom.c3
-rw-r--r--src/backend/commands/indexcmds.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/commands/copyfrom.c b/src/backend/commands/copyfrom.c
index a976008b3d4..e8bb168aea8 100644
--- a/src/backend/commands/copyfrom.c
+++ b/src/backend/commands/copyfrom.c
@@ -1202,7 +1202,6 @@ BeginCopyFrom(ParseState *pstate,
num_defaults;
FmgrInfo *in_functions;
Oid *typioparams;
- int attnum;
Oid in_func_oid;
int *defmap;
ExprState **defexprs;
@@ -1401,7 +1400,7 @@ BeginCopyFrom(ParseState *pstate,
defmap = (int *) palloc(num_phys_attrs * sizeof(int));
defexprs = (ExprState **) palloc(num_phys_attrs * sizeof(ExprState *));
- for (attnum = 1; attnum <= num_phys_attrs; attnum++)
+ for (int attnum = 1; attnum <= num_phys_attrs; attnum++)
{
Form_pg_attribute att = TupleDescAttr(tupDesc, attnum - 1);
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 667f2a4cd16..3c6e09815e0 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -565,7 +565,6 @@ DefineIndex(Oid relationId,
Oid root_save_userid;
int root_save_sec_context;
int root_save_nestlevel;
- int i;
root_save_nestlevel = NewGUCNestLevel();
@@ -1047,7 +1046,7 @@ DefineIndex(Oid relationId,
* We disallow indexes on system columns. They would not necessarily get
* updated correctly, and they don't seem useful anyway.
*/
- for (i = 0; i < indexInfo->ii_NumIndexAttrs; i++)
+ for (int i = 0; i < indexInfo->ii_NumIndexAttrs; i++)
{
AttrNumber attno = indexInfo->ii_IndexAttrNumbers[i];
@@ -1067,7 +1066,7 @@ DefineIndex(Oid relationId,
pull_varattnos((Node *) indexInfo->ii_Expressions, 1, &indexattrs);
pull_varattnos((Node *) indexInfo->ii_Predicate, 1, &indexattrs);
- for (i = FirstLowInvalidHeapAttributeNumber + 1; i < 0; i++)
+ for (int i = FirstLowInvalidHeapAttributeNumber + 1; i < 0; i++)
{
if (bms_is_member(i - FirstLowInvalidHeapAttributeNumber,
indexattrs))
@@ -1243,7 +1242,7 @@ DefineIndex(Oid relationId,
* If none matches, build a new index by calling ourselves
* recursively with the same options (except for the index name).
*/
- for (i = 0; i < nparts; i++)
+ for (int i = 0; i < nparts; i++)
{
Oid childRelid = part_oids[i];
Relation childrel;