diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-24 21:03:42 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-24 21:03:42 +0000 |
commit | b15f9b08efb0665f0c145ebf928b7e11c0a602ed (patch) | |
tree | 3921a026032a8ff2f1f61f49361d2c67f949312b /src/backend/tcop/postgres.c | |
parent | b5b9e33564b453c6c15495b8eb93d988a22cdf3c (diff) | |
download | postgresql-b15f9b08efb0665f0c145ebf928b7e11c0a602ed.tar.gz postgresql-b15f9b08efb0665f0c145ebf928b7e11c0a602ed.zip |
Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32. Also, add a security check
on Win32 that parallels the can't-run-as-root check on Unix.
Magnus Hagander
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 976b417e096..9b7cfcd6681 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.420 2004/06/11 01:09:00 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.421 2004/06/24 21:03:08 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2578,12 +2578,11 @@ PostgresMain(int argc, char *argv[], const char *username) { if (!potential_DataDir) { - fprintf(stderr, - gettext("%s does not know where to find the database system data.\n" - "You must specify the directory that contains the database system\n" - "either by specifying the -D invocation option or by setting the\n" - "PGDATA environment variable.\n"), - argv[0]); + write_stderr("%s does not know where to find the database system data.\n" + "You must specify the directory that contains the database system\n" + "either by specifying the -D invocation option or by setting the\n" + "PGDATA environment variable.\n", + argv[0]); proc_exit(1); } SetDataDir(potential_DataDir); |