We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent37d6930 commit18b5835Copy full SHA for 18b5835
src/bin/pg_ctl/pg_ctl.c
@@ -4,7 +4,7 @@
4
*
5
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
6
7
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.45 2004/11/04 22:25:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.46 2004/11/17 16:34:42 tgl Exp $
8
9
*-------------------------------------------------------------------------
10
*/
@@ -1284,7 +1284,7 @@ main(int argc, char **argv)
1284
1285
strcpy(pgdata_D,optarg);
1286
canonicalize_path(pgdata_D);
1287
-snprintf(env_var,strlen(pgdata_D)+8,"PGDATA=%s",
+snprintf(env_var,strlen(optarg)+8,"PGDATA=%s",
1288
pgdata_D);
1289
putenv(env_var);
1290
@@ -1294,7 +1294,8 @@ main(int argc, char **argv)
1294
*postmaster 'ps' display
1295
1296
pgdata_opt=xmalloc(strlen(pgdata_D)+7);
1297
-snprintf(pgdata_opt,strlen(pgdata_D)+7,"-D \"%s\" ",
+snprintf(pgdata_opt,strlen(pgdata_D)+7,
1298
+"-D \"%s\" ",
1299
1300
break;
1301
}