8000 Minor fix of index variable in inserttable method · PyGreSQL/PyGreSQL@f96cee9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f96cee9

Browse files
committed
Minor fix of index variable in inserttable method
1 parent b7148ab commit f96cee9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pgconn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ conn_inserttable(connObject *self, PyObject *args)
771771
if (columns) {
772772
/* adds a string like f" ({','.join(columns)})" */
773773
bufpt += sprintf(bufpt, " (");
774-
for (int i = 0; i < n; ++i) {
775-
PyObject *obj = getcolumn(columns, i);
774+
for (j = 0; j < n; ++j) {
775+
PyObject *obj = getcolumn(columns, j);
776776
ssize_t slen;
777777
char *col;
778778

@@ -790,7 +790,7 @@ conn_inserttable(connObject *self, PyObject *args)
790790
"The third argument must contain only strings");
791791
}
792792
col = PQescapeIdentifier(self->cnx, col, (size_t) slen);
793-
bufpt += sprintf(bufpt, "%s%s", col, i == n - 1 ? ")" : ",");
793+
bufpt += sprintf(bufpt, "%s%s", col, j == n - 1 ? ")" : ",");
794794
PQfreemem(col);
795795
}
796796
}

0 commit comments

Comments
 (0)
0