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
bd9c8e74
Commit
bd9c8e74
authored
Nov 30, 2012
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move long_options structures to the top of main() functions, for
consistency. Per suggestion from Tom.
parent
da63fec7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
34 deletions
+37
-34
contrib/pg_test_fsync/pg_test_fsync.c
contrib/pg_test_fsync/pg_test_fsync.c
+1
-0
contrib/pg_test_timing/pg_test_timing.c
contrib/pg_test_timing/pg_test_timing.c
+1
-0
contrib/pgbench/pgbench.c
contrib/pgbench/pgbench.c
+9
-9
src/bin/pg_basebackup/pg_receivexlog.c
src/bin/pg_basebackup/pg_receivexlog.c
+1
-0
src/bin/pg_dump/pg_dumpall.c
src/bin/pg_dump/pg_dumpall.c
+18
-18
src/test/regress/pg_regress.c
src/test/regress/pg_regress.c
+7
-7
No files found.
contrib/pg_test_fsync/pg_test_fsync.c
View file @
bd9c8e74
...
...
@@ -140,6 +140,7 @@ handle_args(int argc, char *argv[])
{
"secs-per-test"
,
required_argument
,
NULL
,
's'
},
{
NULL
,
0
,
NULL
,
0
}
};
int
option
;
/* Command line option */
int
optindex
=
0
;
/* used by getopt_long */
...
...
contrib/pg_test_timing/pg_test_timing.c
View file @
bd9c8e74
...
...
@@ -43,6 +43,7 @@ handle_args(int argc, char *argv[])
{
"duration"
,
required_argument
,
NULL
,
'd'
},
{
NULL
,
0
,
NULL
,
0
}
};
int
option
;
/* Command line option */
int
optindex
=
0
;
/* used by getopt_long */
...
...
contrib/pgbench/pgbench.c
View file @
bd9c8e74
...
...
@@ -1915,6 +1915,15 @@ printResults(int ttype, int normal_xacts, int nclients,
int
main
(
int
argc
,
char
**
argv
)
{
static
struct
option
long_options
[]
=
{
{
"foreign-keys"
,
no_argument
,
&
foreign_keys
,
1
},
{
"index-tablespace"
,
required_argument
,
NULL
,
3
},
{
"tablespace"
,
required_argument
,
NULL
,
2
},
{
"unlogged-tables"
,
no_argument
,
&
unlogged_tables
,
1
},
{
"sampling-rate"
,
required_argument
,
NULL
,
4
},
{
NULL
,
0
,
NULL
,
0
}
};
int
c
;
int
nclients
=
1
;
/* default number of simulated clients */
int
nthreads
=
1
;
/* default number of threads */
...
...
@@ -1937,15 +1946,6 @@ main(int argc, char **argv)
int
i
;
static
struct
option
long_options
[]
=
{
{
"foreign-keys"
,
no_argument
,
&
foreign_keys
,
1
},
{
"index-tablespace"
,
required_argument
,
NULL
,
3
},
{
"tablespace"
,
required_argument
,
NULL
,
2
},
{
"unlogged-tables"
,
no_argument
,
&
unlogged_tables
,
1
},
{
"sampling-rate"
,
required_argument
,
NULL
,
4
},
{
NULL
,
0
,
NULL
,
0
}
};
#ifdef HAVE_GETRLIMIT
struct
rlimit
rlim
;
#endif
...
...
src/bin/pg_basebackup/pg_receivexlog.c
View file @
bd9c8e74
...
...
@@ -315,6 +315,7 @@ main(int argc, char **argv)
{
"verbose"
,
no_argument
,
NULL
,
'v'
},
{
NULL
,
0
,
NULL
,
0
}
};
int
c
;
int
option_index
;
...
...
src/bin/pg_dump/pg_dumpall.c
View file @
bd9c8e74
...
...
@@ -82,24 +82,6 @@ static char *filename = NULL;
int
main
(
int
argc
,
char
*
argv
[])
{
char
*
pghost
=
NULL
;
char
*
pgport
=
NULL
;
char
*
pguser
=
NULL
;
char
*
pgdb
=
NULL
;
char
*
use_role
=
NULL
;
enum
trivalue
prompt_password
=
TRI_DEFAULT
;
bool
data_only
=
false
;
bool
globals_only
=
false
;
bool
output_clean
=
false
;
bool
roles_only
=
false
;
bool
tablespaces_only
=
false
;
PGconn
*
conn
;
int
encoding
;
const
char
*
std_strings
;
int
c
,
ret
;
int
optindex
;
static
struct
option
long_options
[]
=
{
{
"data-only"
,
no_argument
,
NULL
,
'a'
},
{
"clean"
,
no_argument
,
NULL
,
'c'
},
...
...
@@ -142,6 +124,24 @@ main(int argc, char *argv[])
{
NULL
,
0
,
NULL
,
0
}
};
char
*
pghost
=
NULL
;
char
*
pgport
=
NULL
;
char
*
pguser
=
NULL
;
char
*
pgdb
=
NULL
;
char
*
use_role
=
NULL
;
enum
trivalue
prompt_password
=
TRI_DEFAULT
;
bool
data_only
=
false
;
bool
globals_only
=
false
;
bool
output_clean
=
false
;
bool
roles_only
=
false
;
bool
tablespaces_only
=
false
;
PGconn
*
conn
;
int
encoding
;
const
char
*
std_strings
;
int
c
,
ret
;
int
optindex
;
set_pglocale_pgservice
(
argv
[
0
],
PG_TEXTDOMAIN
(
"pg_dump"
));
progname
=
get_progname
(
argv
[
0
]);
...
...
src/test/regress/pg_regress.c
View file @
bd9c8e74
...
...
@@ -1906,13 +1906,6 @@ help(void)
int
regression_main
(
int
argc
,
char
*
argv
[],
init_function
ifunc
,
test_function
tfunc
)
{
_stringlist
*
sl
;
int
c
;
int
i
;
int
option_index
;
char
buf
[
MAXPGPATH
*
4
];
char
buf2
[
MAXPGPATH
*
4
];
static
struct
option
long_options
[]
=
{
{
"help"
,
no_argument
,
NULL
,
'h'
},
{
"version"
,
no_argument
,
NULL
,
'V'
},
...
...
@@ -1941,6 +1934,13 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
{
NULL
,
0
,
NULL
,
0
}
};
_stringlist
*
sl
;
int
c
;
int
i
;
int
option_index
;
char
buf
[
MAXPGPATH
*
4
];
char
buf2
[
MAXPGPATH
*
4
];
progname
=
get_progname
(
argv
[
0
]);
set_pglocale_pgservice
(
argv
[
0
],
PG_TEXTDOMAIN
(
"pg_regress"
));
...
...
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