Harmonize parameter names in pg_dump/pg_dumpall.
Make sure that function declarations use names that exactly match the corresponding names from function definitions in pg_dump/pg_dumpall related code. Affected code happens to be inconsistent in how it applies conventions around how Archive and Archive Handle variables are named. Significant code churn is required to fully fix those inconsistencies, so take the least invasive approach possible: treat function definition names as authoritative, and mechanically adjust corresponding names from function definitions to match. Like other recent commits that cleaned up function parameter names, this commit was written with help from clang-tidy. Author: Peter Geoghegan <pg@bowt.ie> Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CAH2-Wzmma+vzcO6gr5NYDZ+sx0G14aU-UrzFutT2FoRaisVCUQ@mail.gmail.com
This commit is contained in:
parent
0faf7d933f
commit
20e69daa13
|
@ -79,7 +79,7 @@ typedef struct _catalogIdMapEntry
|
|||
|
||||
static catalogid_hash *catalogIdHash = NULL;
|
||||
|
||||
static void flagInhTables(Archive *fout, TableInfo *tbinfo, int numTables,
|
||||
static void flagInhTables(Archive *fout, TableInfo *tblinfo, int numTables,
|
||||
InhInfo *inhinfo, int numInherits);
|
||||
static void flagInhIndexes(Archive *fout, TableInfo *tblinfo, int numTables);
|
||||
static void flagInhAttrs(DumpOptions *dopt, TableInfo *tblinfo, int numTables);
|
||||
|
|
|
@ -285,18 +285,18 @@ extern void DisconnectDatabase(Archive *AHX);
|
|||
extern PGconn *GetConnection(Archive *AHX);
|
||||
|
||||
/* Called to write *data* to the archive */
|
||||
extern void WriteData(Archive *AH, const void *data, size_t dLen);
|
||||
extern void WriteData(Archive *AHX, const void *data, size_t dLen);
|
||||
|
||||
extern int StartBlob(Archive *AH, Oid oid);
|
||||
extern int EndBlob(Archive *AH, Oid oid);
|
||||
extern int StartBlob(Archive *AHX, Oid oid);
|
||||
extern int EndBlob(Archive *AHX, Oid oid);
|
||||
|
||||
extern void CloseArchive(Archive *AH);
|
||||
extern void CloseArchive(Archive *AHX);
|
||||
|
||||
extern void SetArchiveOptions(Archive *AH, DumpOptions *dopt, RestoreOptions *ropt);
|
||||
|
||||
extern void ProcessArchiveRestoreOptions(Archive *AH);
|
||||
extern void ProcessArchiveRestoreOptions(Archive *AHX);
|
||||
|
||||
extern void RestoreArchive(Archive *AH);
|
||||
extern void RestoreArchive(Archive *AHX);
|
||||
|
||||
/* Open an existing archive */
|
||||
extern Archive *OpenArchive(const char *FileSpec, const ArchiveFormat fmt);
|
||||
|
@ -307,7 +307,7 @@ extern Archive *CreateArchive(const char *FileSpec, const ArchiveFormat fmt,
|
|||
SetupWorkerPtrType setupDumpWorker);
|
||||
|
||||
/* The --list option */
|
||||
extern void PrintTOCSummary(Archive *AH);
|
||||
extern void PrintTOCSummary(Archive *AHX);
|
||||
|
||||
extern RestoreOptions *NewRestoreOptions(void);
|
||||
|
||||
|
|
|
@ -457,7 +457,7 @@ extern bool checkSeek(FILE *fp);
|
|||
extern size_t WriteInt(ArchiveHandle *AH, int i);
|
||||
extern int ReadInt(ArchiveHandle *AH);
|
||||
extern char *ReadStr(ArchiveHandle *AH);
|
||||
extern size_t WriteStr(ArchiveHandle *AH, const char *s);
|
||||
extern size_t WriteStr(ArchiveHandle *AH, const char *c);
|
||||
|
||||
int ReadOffset(ArchiveHandle *, pgoff_t *);
|
||||
size_t WriteOffset(ArchiveHandle *, pgoff_t, int);
|
||||
|
|
|
@ -40,7 +40,7 @@ static void _StartData(ArchiveHandle *AH, TocEntry *te);
|
|||
static void _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
|
||||
static void _EndData(ArchiveHandle *AH, TocEntry *te);
|
||||
static int _WriteByte(ArchiveHandle *AH, const int i);
|
||||
static int _ReadByte(ArchiveHandle *);
|
||||
static int _ReadByte(ArchiveHandle *AH);
|
||||
static void _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len);
|
||||
static void _ReadBuf(ArchiveHandle *AH, void *buf, size_t len);
|
||||
static void _CloseArchive(ArchiveHandle *AH);
|
||||
|
|
|
@ -67,7 +67,7 @@ static void _StartData(ArchiveHandle *AH, TocEntry *te);
|
|||
static void _EndData(ArchiveHandle *AH, TocEntry *te);
|
||||
static void _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
|
||||
static int _WriteByte(ArchiveHandle *AH, const int i);
|
||||
static int _ReadByte(ArchiveHandle *);
|
||||
static int _ReadByte(ArchiveHandle *AH);
|
||||
static void _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len);
|
||||
static void _ReadBuf(ArchiveHandle *AH, void *buf, size_t len);
|
||||
static void _CloseArchive(ArchiveHandle *AH);
|
||||
|
|
|
@ -46,7 +46,7 @@ static void _StartData(ArchiveHandle *AH, TocEntry *te);
|
|||
static void _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
|
||||
static void _EndData(ArchiveHandle *AH, TocEntry *te);
|
||||
static int _WriteByte(ArchiveHandle *AH, const int i);
|
||||
static int _ReadByte(ArchiveHandle *);
|
||||
static int _ReadByte(ArchiveHandle *AH);
|
||||
static void _WriteBuf(ArchiveHandle *AH, const void *buf, size_t len);
|
||||
static void _ReadBuf(ArchiveHandle *AH, void *buf, size_t len);
|
||||
static void _CloseArchive(ArchiveHandle *AH);
|
||||
|
@ -97,7 +97,7 @@ typedef struct
|
|||
static void _LoadBlobs(ArchiveHandle *AH);
|
||||
|
||||
static TAR_MEMBER *tarOpen(ArchiveHandle *AH, const char *filename, char mode);
|
||||
static void tarClose(ArchiveHandle *AH, TAR_MEMBER *TH);
|
||||
static void tarClose(ArchiveHandle *AH, TAR_MEMBER *th);
|
||||
|
||||
#ifdef __NOT_USED__
|
||||
static char *tarGets(char *buf, size_t len, TAR_MEMBER *th);
|
||||
|
|
|
@ -221,7 +221,7 @@ static void dumpFunc(Archive *fout, const FuncInfo *finfo);
|
|||
static void dumpCast(Archive *fout, const CastInfo *cast);
|
||||
static void dumpTransform(Archive *fout, const TransformInfo *transform);
|
||||
static void dumpOpr(Archive *fout, const OprInfo *oprinfo);
|
||||
static void dumpAccessMethod(Archive *fout, const AccessMethodInfo *oprinfo);
|
||||
static void dumpAccessMethod(Archive *fout, const AccessMethodInfo *aminfo);
|
||||
static void dumpOpclass(Archive *fout, const OpclassInfo *opcinfo);
|
||||
static void dumpOpfamily(Archive *fout, const OpfamilyInfo *opfinfo);
|
||||
static void dumpCollation(Archive *fout, const CollInfo *collinfo);
|
||||
|
@ -232,7 +232,7 @@ static void dumpTrigger(Archive *fout, const TriggerInfo *tginfo);
|
|||
static void dumpEventTrigger(Archive *fout, const EventTriggerInfo *evtinfo);
|
||||
static void dumpTable(Archive *fout, const TableInfo *tbinfo);
|
||||
static void dumpTableSchema(Archive *fout, const TableInfo *tbinfo);
|
||||
static void dumpTableAttach(Archive *fout, const TableAttachInfo *tbinfo);
|
||||
static void dumpTableAttach(Archive *fout, const TableAttachInfo *attachinfo);
|
||||
static void dumpAttrDef(Archive *fout, const AttrDefInfo *adinfo);
|
||||
static void dumpSequence(Archive *fout, const TableInfo *tbinfo);
|
||||
static void dumpSequenceData(Archive *fout, const TableDataInfo *tdinfo);
|
||||
|
@ -287,7 +287,7 @@ static void dumpPolicy(Archive *fout, const PolicyInfo *polinfo);
|
|||
static void dumpPublication(Archive *fout, const PublicationInfo *pubinfo);
|
||||
static void dumpPublicationTable(Archive *fout, const PublicationRelInfo *pubrinfo);
|
||||
static void dumpSubscription(Archive *fout, const SubscriptionInfo *subinfo);
|
||||
static void dumpDatabase(Archive *AH);
|
||||
static void dumpDatabase(Archive *fout);
|
||||
static void dumpDatabaseConfig(Archive *AH, PQExpBuffer outbuf,
|
||||
const char *dbname, Oid dboid);
|
||||
static void dumpEncoding(Archive *AH);
|
||||
|
@ -315,7 +315,7 @@ static bool nonemptyReloptions(const char *reloptions);
|
|||
static void appendReloptionsArrayAH(PQExpBuffer buffer, const char *reloptions,
|
||||
const char *prefix, Archive *fout);
|
||||
static char *get_synchronized_snapshot(Archive *fout);
|
||||
static void setupDumpWorker(Archive *AHX);
|
||||
static void setupDumpWorker(Archive *AH);
|
||||
static TableInfo *getRootTableInfo(const TableInfo *tbinfo);
|
||||
|
||||
|
||||
|
|
|
@ -705,8 +705,8 @@ extern NamespaceInfo *getNamespaces(Archive *fout, int *numNamespaces);
|
|||
extern ExtensionInfo *getExtensions(Archive *fout, int *numExtensions);
|
||||
extern TypeInfo *getTypes(Archive *fout, int *numTypes);
|
||||
extern FuncInfo *getFuncs(Archive *fout, int *numFuncs);
|
||||
extern AggInfo *getAggregates(Archive *fout, int *numAggregates);
|
||||
extern OprInfo *getOperators(Archive *fout, int *numOperators);
|
||||
extern AggInfo *getAggregates(Archive *fout, int *numAggs);
|
||||
extern OprInfo *getOperators(Archive *fout, int *numOprs);
|
||||
extern AccessMethodInfo *getAccessMethods(Archive *fout, int *numAccessMethods);
|
||||
extern OpclassInfo *getOpclasses(Archive *fout, int *numOpclasses);
|
||||
extern OpfamilyInfo *getOpfamilies(Archive *fout, int *numOpfamilies);
|
||||
|
@ -723,7 +723,7 @@ extern void getTriggers(Archive *fout, TableInfo tblinfo[], int numTables);
|
|||
extern ProcLangInfo *getProcLangs(Archive *fout, int *numProcLangs);
|
||||
extern CastInfo *getCasts(Archive *fout, int *numCasts);
|
||||
extern TransformInfo *getTransforms(Archive *fout, int *numTransforms);
|
||||
extern void getTableAttrs(Archive *fout, TableInfo *tbinfo, int numTables);
|
||||
extern void getTableAttrs(Archive *fout, TableInfo *tblinfo, int numTables);
|
||||
extern bool shouldPrintColumn(const DumpOptions *dopt, const TableInfo *tbinfo, int colno);
|
||||
extern TSParserInfo *getTSParsers(Archive *fout, int *numTSParsers);
|
||||
extern TSDictInfo *getTSDictionaries(Archive *fout, int *numTSDicts);
|
||||
|
|
|
@ -72,8 +72,10 @@ static void buildShSecLabels(PGconn *conn,
|
|||
const char *catalog_name, Oid objectId,
|
||||
const char *objtype, const char *objname,
|
||||
PQExpBuffer buffer);
|
||||
static PGconn *connectDatabase(const char *dbname, const char *connstr, const char *pghost, const char *pgport,
|
||||
const char *pguser, trivalue prompt_password, bool fail_on_error);
|
||||
static PGconn *connectDatabase(const char *dbname,
|
||||
const char *connection_string, const char *pghost,
|
||||
const char *pgport, const char *pguser,
|
||||
trivalue prompt_password, bool fail_on_error);
|
||||
static char *constructConnStr(const char **keywords, const char **values);
|
||||
static PGresult *executeQuery(PGconn *conn, const char *query);
|
||||
static void executeCommand(PGconn *conn, const char *query);
|
||||
|
|
Loading…
Reference in New Issue