appendPQExpBuffer(&namebuf, "%s %s",
typeInfo->dobj.name, lanname);
transforminfo[i].dobj.name = namebuf.data;
+ free(lanname);
}
PQclear(res);
addObjectDependency(&contable->dataObj->dobj,
reftable->dataObj->dobj.dumpId);
}
+ PQclear(res);
destroyPQExpBuffer(query);
}
pg_free(str);
/*
- * Also check that full_page_writes is enabled. We can get torn pages if
+ * Also check that full_page_writes is enabled. We can get torn pages if
* a page is modified while we read it with pg_read_binary_file(), and we
* rely on full page images to fix them.
*/
/*
* Runs a query that returns a single value.
+ * The result should be pg_free'd after use.
*/
static char *
run_simple_query(const char *sql)
result = ((uint64) hi) << 32 | lo;
+ pg_free(val);
+
return result;
}
process_source_file(path, type, filesize, link_target);
}
+ PQclear(res);
}
/*----
if (PQgetisnull(res, 0, 2))
{
pg_log(PG_DEBUG,
- "received NULL chunk for file \"%s\", file has been deleted\n",
+ "received NULL chunk for file \"%s\", file has been deleted\n",
filename);
pg_free(filename);
PQclear(res);
for (i = 0; i < ntups; i++)
{
appendPQExpBufferStr(&buf,
- fmtQualifiedId(PQserverVersion(conn),
- PQgetvalue(res, i, 1),
- PQgetvalue(res, i, 0)));
+ fmtQualifiedId(PQserverVersion(conn),
+ PQgetvalue(res, i, 1),
+ PQgetvalue(res, i, 0)));
simple_string_list_append(&dbtables, buf.data);
resetPQExpBuffer(&buf);
concurrentCons = ntups;
if (concurrentCons <= 1)
parallel = false;
+ PQclear(res);
}
/*