aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 3082093d1ea..f8808d2191f 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3718,7 +3718,7 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx,
* postmaster/postmaster.c (the option sets should not conflict) and with
* the common help() function in main/main.c.
*/
- while ((flag = getopt(argc, argv, "B:bc:C:D:d:EeFf:h:ijk:lN:nOPp:r:S:sTt:v:W:-:")) != -1)
+ while ((flag = getopt(argc, argv, "B:bC:c:D:d:EeFf:h:ijk:lN:nOPp:r:S:sTt:v:W:-:")) != -1)
{
switch (flag)
{
@@ -3736,6 +3736,32 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx,
/* ignored for consistency with the postmaster */
break;
+ case 'c':
+ case '-':
+ {
+ char *name,
+ *value;
+
+ ParseLongOption(optarg, &name, &value);
+ if (!value)
+ {
+ if (flag == '-')
+ ereport(ERROR,
+ (errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("--%s requires a value",
+ optarg)));
+ else
+ ereport(ERROR,
+ (errcode(ERRCODE_SYNTAX_ERROR),
+ errmsg("-c %s requires a value",
+ optarg)));
+ }
+ SetConfigOption(name, value, ctx, gucsource);
+ pfree(name);
+ pfree(value);
+ break;
+ }
+
case 'D':
if (secure)
userDoption = strdup(optarg);
@@ -3850,32 +3876,6 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx,
SetConfigOption("post_auth_delay", optarg, ctx, gucsource);
break;
- case 'c':
- case '-':
- {
- char *name,
- *value;
-
- ParseLongOption(optarg, &name, &value);
- if (!value)
- {
- if (flag == '-')
- ereport(ERROR,
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("--%s requires a value",
- optarg)));
- else
- ereport(ERROR,
- (errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("-c %s requires a value",
- optarg)));
- }
- SetConfigOption(name, value, ctx, gucsource);
- pfree(name);
- pfree(value);
- break;
- }
-
default:
errs++;
break;