Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
effbe6ec
Commit
effbe6ec
authored
Jun 22, 2011
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename pg_upgrade directory validation function, for clarity.
parent
559b114d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
contrib/pg_upgrade/check.c
contrib/pg_upgrade/check.c
+1
-2
contrib/pg_upgrade/option.c
contrib/pg_upgrade/option.c
+8
-8
No files found.
contrib/pg_upgrade/check.c
View file @
effbe6ec
...
...
@@ -393,8 +393,7 @@ check_old_cluster_has_new_cluster_dbs(void)
* This is particularly useful for tablespace deletion.
*/
void
create_script_for_old_cluster_deletion
(
char
**
deletion_script_file_name
)
create_script_for_old_cluster_deletion
(
char
**
deletion_script_file_name
)
{
FILE
*
script
=
NULL
;
int
tblnum
;
...
...
contrib/pg_upgrade/option.c
View file @
effbe6ec
...
...
@@ -17,7 +17,7 @@
static
void
usage
(
void
);
static
void
validateDirectoryOption
(
char
**
dirpath
,
static
void
check_required_directory
(
char
**
dirpath
,
char
*
envVarName
,
char
*
cmdLineOption
,
char
*
description
);
...
...
@@ -203,13 +203,13 @@ parseCommandLine(int argc, char *argv[])
}
/* Get values from env if not already set */
validateDirectoryOption
(
&
old_cluster
.
bindir
,
"OLDBINDIR"
,
"-b"
,
check_required_directory
(
&
old_cluster
.
bindir
,
"OLDBINDIR"
,
"-b"
,
"old cluster binaries reside"
);
validateDirectoryOption
(
&
new_cluster
.
bindir
,
"NEWBINDIR"
,
"-B"
,
check_required_directory
(
&
new_cluster
.
bindir
,
"NEWBINDIR"
,
"-B"
,
"new cluster binaries reside"
);
validateDirectoryOption
(
&
old_cluster
.
pgdata
,
"OLDDATADIR"
,
"-d"
,
check_required_directory
(
&
old_cluster
.
pgdata
,
"OLDDATADIR"
,
"-d"
,
"old cluster data resides"
);
validateDirectoryOption
(
&
new_cluster
.
pgdata
,
"NEWDATADIR"
,
"-D"
,
check_required_directory
(
&
new_cluster
.
pgdata
,
"NEWDATADIR"
,
"-D"
,
"new cluster data resides"
);
}
...
...
@@ -272,9 +272,9 @@ or\n"), old_cluster.port, new_cluster.port, os_info.user);
/*
*
validateDirectoryOption
()
*
check_required_directory
()
*
*
Validate
s a directory option.
*
Check
s a directory option.
* dirpath - the directory name supplied on the command line
* envVarName - the name of an environment variable to get if dirpath is NULL
* 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);
* user hasn't provided the required directory name.
*/
static
void
validateDirectoryOption
(
char
**
dirpath
,
char
*
envVarName
,
check_required_directory
(
char
**
dirpath
,
char
*
envVarName
,
char
*
cmdLineOption
,
char
*
description
)
{
if
(
*
dirpath
==
NULL
||
strlen
(
*
dirpath
)
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment