Remove use of geteuid under Win32.
authorBruce Momjian
Fri, 16 May 2003 02:40:19 +0000 (02:40 +0000)
committerBruce Momjian
Fri, 16 May 2003 02:40:19 +0000 (02:40 +0000)
src/backend/commands/copy.c

index 20a46cc92295f29536ae24a26818e178d850e218..b5b840504be118c55cc5456cebdd8f7b42bb746c 100644 (file)
@@ -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))
            {