diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/initdb/initdb.c | 12 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_db.c | 2 | ||||
-rw-r--r-- | src/bin/pg_dump/pg_backup_db.h | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/fetch.c | 2 | ||||
-rw-r--r-- | src/bin/pg_rewind/fetch.h | 2 | ||||
-rw-r--r-- | src/bin/pg_upgrade/option.c | 6 | ||||
-rw-r--r-- | src/bin/pg_upgrade/pg_upgrade.c | 4 | ||||
-rw-r--r-- | src/bin/pg_waldump/pg_waldump.c | 2 | ||||
-rw-r--r-- | src/bin/pgbench/pgbench.c | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 27fcf5a87f7..bb2bc065ef9 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -239,10 +239,10 @@ static void writefile(char *path, char **lines); static FILE *popen_check(const char *command, const char *mode); static void exit_nicely(void); static char *get_id(void); -static int get_encoding_id(char *encoding_name); -static void set_input(char **dest, char *filename); +static int get_encoding_id(const char *encoding_name); +static void set_input(char **dest, const char *filename); static void check_input(char *path); -static void write_version_file(char *extrapath); +static void write_version_file(const char *extrapath); static void set_null_conf(void); static void test_config_settings(void); static void setup_config(void); @@ -640,7 +640,7 @@ encodingid_to_string(int enc) * get the encoding id for a given encoding name */ static int -get_encoding_id(char *encoding_name) +get_encoding_id(const char *encoding_name) { int enc; @@ -751,7 +751,7 @@ find_matching_ts_config(const char *lc_type) * set name of given input file variable under data directory */ static void -set_input(char **dest, char *filename) +set_input(char **dest, const char *filename) { *dest = psprintf("%s/%s", share_path, filename); } @@ -801,7 +801,7 @@ check_input(char *path) * if extrapath is not NULL */ static void -write_version_file(char *extrapath) +write_version_file(const char *extrapath) { FILE *version_file; char *path; diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c index befcde46306..216853d6272 100644 --- a/src/bin/pg_dump/pg_backup_db.c +++ b/src/bin/pg_dump/pg_backup_db.c @@ -419,7 +419,7 @@ ExecuteSqlQuery(Archive *AHX, const char *query, ExecStatusType status) * Execute an SQL query and verify that we got exactly one row back. */ PGresult * -ExecuteSqlQueryForSingleRow(Archive *fout, char *query) +ExecuteSqlQueryForSingleRow(Archive *fout, const char *query) { PGresult *res; int ntups; diff --git a/src/bin/pg_dump/pg_backup_db.h b/src/bin/pg_dump/pg_backup_db.h index 527449e0440..a79f5283fe5 100644 --- a/src/bin/pg_dump/pg_backup_db.h +++ b/src/bin/pg_dump/pg_backup_db.h @@ -16,7 +16,7 @@ extern int ExecuteSqlCommandBuf(Archive *AHX, const char *buf, size_t bufLen); extern void ExecuteSqlStatement(Archive *AHX, const char *query); extern PGresult *ExecuteSqlQuery(Archive *AHX, const char *query, ExecStatusType status); -extern PGresult *ExecuteSqlQueryForSingleRow(Archive *fout, char *query); +extern PGresult *ExecuteSqlQueryForSingleRow(Archive *fout, const char *query); extern void EndDBCopyMode(Archive *AHX, const char *tocEntryTag); diff --git a/src/bin/pg_rewind/fetch.c b/src/bin/pg_rewind/fetch.c index e9353d88661..13553e3b5a4 100644 --- a/src/bin/pg_rewind/fetch.c +++ b/src/bin/pg_rewind/fetch.c @@ -51,7 +51,7 @@ executeFileMap(void) * handy for text files. */ char * -fetchFile(char *filename, size_t *filesize) +fetchFile(const char *filename, size_t *filesize) { if (datadir_source) return slurpFile(datadir_source, filename, filesize); diff --git a/src/bin/pg_rewind/fetch.h b/src/bin/pg_rewind/fetch.h index 1e08f76b3e9..7288120a0bd 100644 --- a/src/bin/pg_rewind/fetch.h +++ b/src/bin/pg_rewind/fetch.h @@ -24,7 +24,7 @@ * config options. */ extern void fetchSourceFileList(void); -extern char *fetchFile(char *filename, size_t *filesize); +extern char *fetchFile(const char *filename, size_t *filesize); extern void executeFileMap(void); /* in libpq_fetch.c */ diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c index c74eb25e18c..f7f2ebdacfa 100644 --- a/src/bin/pg_upgrade/option.c +++ b/src/bin/pg_upgrade/option.c @@ -22,7 +22,7 @@ static void usage(void); static void check_required_directory(char **dirpath, char **configpath, - char *envVarName, char *cmdLineOption, char *description); + const char *envVarName, const char *cmdLineOption, const char *description); #define FIX_DEFAULT_READ_ONLY "-c default_transaction_read_only=false" @@ -341,8 +341,8 @@ usage(void) */ static void check_required_directory(char **dirpath, char **configpath, - char *envVarName, char *cmdLineOption, - char *description) + const char *envVarName, const char *cmdLineOption, + const char *description) { if (*dirpath == NULL || strlen(*dirpath) == 0) { diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c index d44fefb457b..c10103f0bff 100644 --- a/src/bin/pg_upgrade/pg_upgrade.c +++ b/src/bin/pg_upgrade/pg_upgrade.c @@ -363,7 +363,7 @@ create_new_objects(void) * Delete the given subdirectory contents from the new cluster */ static void -remove_new_subdir(char *subdir, bool rmtopdir) +remove_new_subdir(const char *subdir, bool rmtopdir) { char new_path[MAXPGPATH]; @@ -380,7 +380,7 @@ remove_new_subdir(char *subdir, bool rmtopdir) * Copy the files from the old cluster into it */ static void -copy_subdir_files(char *old_subdir, char *new_subdir) +copy_subdir_files(const char *old_subdir, const char *new_subdir) { char old_path[MAXPGPATH]; char new_path[MAXPGPATH]; diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c index 53eca4c8e02..6443eda6dfe 100644 --- a/src/bin/pg_waldump/pg_waldump.c +++ b/src/bin/pg_waldump/pg_waldump.c @@ -175,7 +175,7 @@ open_file_in_directory(const char *directory, const char *fname) * wal segment size. */ static bool -search_directory(char *directory, char *fname) +search_directory(const char *directory, const char *fname) { int fd = -1; DIR *xldir; diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index d4a60351a86..ec56a74de06 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -1870,7 +1870,7 @@ preparedStatementName(char *buffer, int file, int state) } static void -commandFailed(CState *st, char *message) +commandFailed(CState *st, const char *message) { fprintf(stderr, "client %d aborted in command %d of script %d; %s\n", @@ -3538,7 +3538,7 @@ addScript(ParsedScript script) } static void -printSimpleStats(char *prefix, SimpleStats *ss) +printSimpleStats(const char *prefix, SimpleStats *ss) { /* print NaN if no transactions where executed */ double latency = ss->sum / ss->count; |