diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-05-16 02:40:19 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-05-16 02:40:19 +0000 |
commit | 9ea764a0dc84f83074330f79e8f7cee45b696241 (patch) | |
tree | a8de48895ce9d753dc9b4936011c26eef40cb187 /src/backend/commands/copy.c | |
parent | ec5e0ef79125698c0f717ce7d661c3b23f91deb0 (diff) | |
download | postgresql-9ea764a0dc84f83074330f79e8f7cee45b696241.tar.gz postgresql-9ea764a0dc84f83074330f79e8f7cee45b696241.zip |
Remove use of geteuid under Win32.
Diffstat (limited to 'src/backend/commands/copy.c')
-rw-r--r-- | src/backend/commands/copy.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 20a46cc9229..b5b840504be 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.200 2003/05/09 21:19:48 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.201 2003/05/16 02:40:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -761,10 +761,17 @@ DoCopy(const CopyStmt *stmt) copy_file = AllocateFile(filename, PG_BINARY_R); if (copy_file == NULL) +#ifndef WIN32 elog(ERROR, "COPY command, running in backend with " "effective uid %d, could not open file '%s' for " "reading. Errno = %s (%d).", (int) geteuid(), filename, strerror(errno), errno); +#else + elog(ERROR, "COPY command, running in backend, " + "could not open file '%s' for " + "reading. Errno = %s (%d).", + filename, strerror(errno), errno); +#endif fstat(fileno(copy_file), &st); if (S_ISDIR(st.st_mode)) @@ -814,10 +821,17 @@ DoCopy(const CopyStmt *stmt) umask(oumask); if (copy_file == NULL) +#ifndef WIN32 elog(ERROR, "COPY command, running in backend with " "effective uid %d, could not open file '%s' for " "writing. Errno = %s (%d).", (int) geteuid(), filename, strerror(errno), errno); +#else + elog(ERROR, "COPY command, running in backend, " + "could not open file '%s' for " + "writing. Errno = %s (%d).", + filename, strerror(errno), errno); +#endif fstat(fileno(copy_file), &st); if (S_ISDIR(st.st_mode)) { |