Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteffbe6e

Browse files
committed
Rename pg_upgrade directory validation function, for clarity.
1 parent559b114 commiteffbe6e

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
inttblnum;

‎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
staticvoidusage(void);
20-
staticvoidvalidateDirectoryOption(char**dirpath,
20+
staticvoidcheck_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
staticvoid
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)

[8]ページ先頭

©2009-2025 Movatter.jp