summaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index d9fe21a07e0..0abca9f803b 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -346,8 +346,7 @@ outBitmapset(StringInfo str, const Bitmapset *bms)
void
outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
{
- Size length,
- i;
+ Size length;
char *s;
length = datumGetSize(value, typbyval, typlen);
@@ -356,7 +355,7 @@ outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
{
s = (char *) (&value);
appendStringInfo(str, "%u [ ", (unsigned int) length);
- for (i = 0; i < (Size) sizeof(Datum); i++)
+ for (Size i = 0; i < (Size) sizeof(Datum); i++)
appendStringInfo(str, "%d ", (int) (s[i]));
appendStringInfoChar(str, ']');
}
@@ -368,7 +367,7 @@ outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
else
{
appendStringInfo(str, "%u [ ", (unsigned int) length);
- for (i = 0; i < length; i++)
+ for (Size i = 0; i < length; i++)
appendStringInfo(str, "%d ", (int) (s[i]));
appendStringInfoChar(str, ']');
}
@@ -434,8 +433,6 @@ _outBoolExpr(StringInfo str, const BoolExpr *node)
static void
_outForeignKeyOptInfo(StringInfo str, const ForeignKeyOptInfo *node)
{
- int i;
-
WRITE_NODE_TYPE("FOREIGNKEYOPTINFO");
WRITE_UINT_FIELD(con_relid);
@@ -450,10 +447,10 @@ _outForeignKeyOptInfo(StringInfo str, const ForeignKeyOptInfo *node)
WRITE_INT_FIELD(nmatched_ri);
/* for compactness, just print the number of matches per column: */
appendStringInfoString(str, " :eclass");
- for (i = 0; i < node->nkeys; i++)
+ for (int i = 0; i < node->nkeys; i++)
appendStringInfo(str, " %d", (node->eclass[i] != NULL));
appendStringInfoString(str, " :rinfos");
- for (i = 0; i < node->nkeys; i++)
+ for (int i = 0; i < node->nkeys; i++)
appendStringInfo(str, " %d", list_length(node->rinfos[i]));
}