Skip to content

Commit effbe6e

Browse files
committed
Rename pg_upgrade directory validation function, for clarity.
1 parent 559b114 commit effbe6e

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

contrib/pg_upgrade/check.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ check_old_cluster_has_new_cluster_dbs(void)
393393
* This is particularly useful for tablespace deletion.
394394
*/
395395
void
396-
create_script_for_old_cluster_deletion(
397-
char **deletion_script_file_name)
396+
create_script_for_old_cluster_deletion(char **deletion_script_file_name)
398397
{
399398
FILE *script = NULL;
400399
int tblnum;

contrib/pg_upgrade/option.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
static void usage(void);
20-
static void validateDirectoryOption(char **dirpath,
20+
static void check_required_directory(char **dirpath,
2121
char *envVarName, char *cmdLineOption, char *description);
2222

2323

@@ -203,13 +203,13 @@ parseCommandLine(int argc, char *argv[])
203203
}
204204

205205
/* Get values from env if not already set */
206-
validateDirectoryOption(&old_cluster.bindir, "OLDBINDIR", "-b",
206+
check_required_directory(&old_cluster.bindir, "OLDBINDIR", "-b",
207207
"old cluster binaries reside");
208-
validateDirectoryOption(&new_cluster.bindir, "NEWBINDIR", "-B",
208+
check_required_directory(&new_cluster.bindir, "NEWBINDIR", "-B",
209209
"new cluster binaries reside");
210-
validateDirectoryOption(&old_cluster.pgdata, "OLDDATADIR", "-d",
210+
check_required_directory(&old_cluster.pgdata, "OLDDATADIR", "-d",
211211
"old cluster data resides");
212-
validateDirectoryOption(&new_cluster.pgdata, "NEWDATADIR", "-D",
212+
check_required_directory(&new_cluster.pgdata, "NEWDATADIR", "-D",
213213
"new cluster data resides");
214214
}
215215

@@ -272,9 +272,9 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
272272

273273

274274
/*
275-
* validateDirectoryOption()
275+
* check_required_directory()
276276
*
277-
* Validates a directory option.
277+
* Checks a directory option.
278278
* dirpath - the directory name supplied on the command line
279279
* envVarName - the name of an environment variable to get if dirpath is NULL
280280
* cmdLineOption - the command line option corresponds to this directory (-o, -O, -n, -N)
@@ -284,7 +284,7 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
284284
* user hasn't provided the required directory name.
285285
*/
286286
static void
287-
validateDirectoryOption(char **dirpath, char *envVarName,
287+
check_required_directory(char **dirpath, char *envVarName,
288288
char *cmdLineOption, char *description)
289289
{
290290
if (*dirpath == NULL || strlen(*dirpath) == 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy