Commit 8354e7b2 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove unused parameters

Remove various unused parameters in pg_dump code.  These have all
become unused over time or were never used.

Discussion: https://www.postgresql.org/message-id/flat/511bb100-f829-ba21-2f10-9f952ec06ead%402ndquadrant.com
parent ff28809f
......@@ -685,7 +685,7 @@ AddAcl(PQExpBuffer aclbuf, const char *keyword, const char *subname)
* keep this file free of assumptions about how to deal with SQL errors.)
*/
void
buildShSecLabelQuery(PGconn *conn, const char *catalog_name, Oid objectId,
buildShSecLabelQuery(const char *catalog_name, Oid objectId,
PQExpBuffer sql)
{
appendPQExpBuffer(sql,
......
......@@ -46,7 +46,7 @@ extern bool buildDefaultACLCommands(const char *type, const char *nspname,
const char *owner,
int remoteVersion,
PQExpBuffer sql);
extern void buildShSecLabelQuery(PGconn *conn, const char *catalog_name,
extern void buildShSecLabelQuery(const char *catalog_name,
Oid objectId, PQExpBuffer sql);
extern void emitShSecLabels(PGconn *conn, PGresult *res,
PQExpBuffer buffer, const char *objtype, const char *objname);
......
......@@ -70,8 +70,7 @@ typedef struct _parallelReadyList
static ArchiveHandle *_allocAH(const char *FileSpec, const ArchiveFormat fmt,
const int compression, bool dosync, ArchiveMode mode,
SetupWorkerPtrType setupWorkerPtr);
static void _getObjectDescription(PQExpBuffer buf, TocEntry *te,
ArchiveHandle *AH);
static void _getObjectDescription(PQExpBuffer buf, TocEntry *te);
static void _printTocEntry(ArchiveHandle *AH, TocEntry *te, bool isData);
static char *sanitize_line(const char *str, bool want_hyphen);
static void _doSetFixedOutputState(ArchiveHandle *AH);
......@@ -91,7 +90,7 @@ static bool _tocEntryIsACL(TocEntry *te);
static void _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te);
static void _enableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te);
static void buildTocEntryArrays(ArchiveHandle *AH);
static void _moveBefore(ArchiveHandle *AH, TocEntry *pos, TocEntry *te);
static void _moveBefore(TocEntry *pos, TocEntry *te);
static int _discoverArchiveFormat(ArchiveHandle *AH);
static int RestoringToDB(ArchiveHandle *AH);
......@@ -121,8 +120,7 @@ static int TocEntrySizeCompare(const void *p1, const void *p2);
static void move_to_ready_list(TocEntry *pending_list,
ParallelReadyList *ready_list,
RestorePass pass);
static TocEntry *pop_next_work_item(ArchiveHandle *AH,
ParallelReadyList *ready_list,
static TocEntry *pop_next_work_item(ParallelReadyList *ready_list,
ParallelState *pstate);
static void mark_dump_job_done(ArchiveHandle *AH,
TocEntry *te,
......@@ -1442,7 +1440,7 @@ SortTocFromFile(Archive *AHX)
* side-effects on the order in which restorable items actually get
* restored.
*/
_moveBefore(AH, AH->toc, te);
_moveBefore(AH->toc, te);
}
if (fclose(fh) != 0)
......@@ -1804,7 +1802,7 @@ _moveAfter(ArchiveHandle *AH, TocEntry *pos, TocEntry *te)
#endif
static void
_moveBefore(ArchiveHandle *AH, TocEntry *pos, TocEntry *te)
_moveBefore(TocEntry *pos, TocEntry *te)
{
/* Unlink te from list */
te->prev->next = te->next;
......@@ -3465,7 +3463,7 @@ _selectTableAccessMethod(ArchiveHandle *AH, const char *tableam)
* This is used for ALTER ... OWNER TO.
*/
static void
_getObjectDescription(PQExpBuffer buf, TocEntry *te, ArchiveHandle *AH)
_getObjectDescription(PQExpBuffer buf, TocEntry *te)
{
const char *type = te->desc;
......@@ -3674,7 +3672,7 @@ _printTocEntry(ArchiveHandle *AH, TocEntry *te, bool isData)
PQExpBuffer temp = createPQExpBuffer();
appendPQExpBufferStr(temp, "ALTER ");
_getObjectDescription(temp, te, AH);
_getObjectDescription(temp, te);
appendPQExpBuffer(temp, " OWNER TO %s;", fmtId(te->owner));
ahprintf(AH, "%s\n\n", temp->data);
destroyPQExpBuffer(temp);
......@@ -4078,7 +4076,7 @@ restore_toc_entries_parallel(ArchiveHandle *AH, ParallelState *pstate,
for (;;)
{
/* Look for an item ready to be dispatched to a worker */
next_work_item = pop_next_work_item(AH, &ready_list, pstate);
next_work_item = pop_next_work_item(&ready_list, pstate);
if (next_work_item != NULL)
{
/* If not to be restored, don't waste time launching a worker */
......@@ -4384,7 +4382,7 @@ move_to_ready_list(TocEntry *pending_list,
* no remaining dependencies, but we have to check for lock conflicts.
*/
static TocEntry *
pop_next_work_item(ArchiveHandle *AH, ParallelReadyList *ready_list,
pop_next_work_item(ParallelReadyList *ready_list,
ParallelState *pstate)
{
/*
......
......@@ -107,7 +107,7 @@ static void tarClose(ArchiveHandle *AH, TAR_MEMBER *TH);
#ifdef __NOT_USED__
static char *tarGets(char *buf, size_t len, TAR_MEMBER *th);
#endif
static int tarPrintf(ArchiveHandle *AH, TAR_MEMBER *th, const char *fmt,...) pg_attribute_printf(3, 4);
static int tarPrintf(TAR_MEMBER *th, const char *fmt,...) pg_attribute_printf(2, 3);
static void _tarAddFile(ArchiveHandle *AH, TAR_MEMBER *th);
static TAR_MEMBER *_tarPositionTo(ArchiveHandle *AH, const char *filename);
......@@ -851,7 +851,7 @@ _CloseArchive(ArchiveHandle *AH)
*/
th = tarOpen(AH, "restore.sql", 'w');
tarPrintf(AH, th, "--\n"
tarPrintf(th, "--\n"
"-- NOTE:\n"
"--\n"
"-- File paths need to be edited. Search for $$PATH$$ and\n"
......@@ -964,7 +964,7 @@ _StartBlob(ArchiveHandle *AH, TocEntry *te, Oid oid)
sprintf(fname, "blob_%u.dat%s", oid, sfx);
tarPrintf(AH, ctx->blobToc, "%u %s\n", oid, fname);
tarPrintf(ctx->blobToc, "%u %s\n", oid, fname);
tctx->TH = tarOpen(AH, fname, 'w');
}
......@@ -1008,7 +1008,7 @@ _EndBlobs(ArchiveHandle *AH, TocEntry *te)
*/
static int
tarPrintf(ArchiveHandle *AH, TAR_MEMBER *th, const char *fmt,...)
tarPrintf(TAR_MEMBER *th, const char *fmt,...)
{
int save_errno = errno;
char *p;
......
This diff is collapsed.
......@@ -1614,7 +1614,7 @@ buildShSecLabels(PGconn *conn, const char *catalog_name, Oid objectId,
PQExpBuffer sql = createPQExpBuffer();
PGresult *res;
buildShSecLabelQuery(conn, catalog_name, objectId, sql);
buildShSecLabelQuery(catalog_name, objectId, sql);
res = executeQuery(conn, sql->data);
emitShSecLabels(conn, res, buffer, objtype, objname);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment