Content-Length: 328835 | pFad | http://github.com/postgrespro/postgres/commit/e09509bd33d691b2d2d3473b4e112efd59518b31

A6 pg_dump: Add some const qualifiers · postgrespro/postgres@e09509b · GitHub
Skip to content

Commit e09509b

Browse files
committed
pg_dump: Add some const qualifiers
1 parent d66b31c commit e09509b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/bin/pg_dump/pg_backup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ typedef struct _restoreOptions
117117
char *use_role; /* Issue SET ROLE to this */
118118
int dataOnly;
119119
int dropSchema;
120-
char *filename;
120+
const char *filename;
121121
int schemaOnly;
122122
int dumpSections;
123123
int verbose;

src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static void vdie_horribly(ArchiveHandle *AH, const char *modulename,
126126
__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 0), noreturn));
127127

128128
static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim);
129-
static void SetOutput(ArchiveHandle *AH, char *filename, int compression);
129+
static void SetOutput(ArchiveHandle *AH, const char *filename, int compression);
130130
static OutputContext SaveOutput(ArchiveHandle *AH);
131131
static void RestoreOutput(ArchiveHandle *AH, OutputContext savedContext);
132132

@@ -1173,7 +1173,7 @@ archprintf(Archive *AH, const char *fmt,...)
11731173
*******************************/
11741174

11751175
static void
1176-
SetOutput(ArchiveHandle *AH, char *filename, int compression)
1176+
SetOutput(ArchiveHandle *AH, const char *filename, int compression)
11771177
{
11781178
int fn;
11791179

src/bin/pg_dump/pg_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ main(int argc, char **argv)
767767
if (plainText)
768768
{
769769
ropt = NewRestoreOptions();
770-
ropt->filename = (char *) filename;
770+
ropt->filename = filename;
771771
ropt->dropSchema = outputClean;
772772
ropt->aclsSkip = aclsSkip;
773773
ropt->superuser = outputSuperuser;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/e09509bd33d691b2d2d3473b4e112efd59518b31

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy