Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ea764a

Browse files
committed
Remove use of geteuid under Win32.
1 parentec5e0ef commit9ea764a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

‎src/backend/commands/copy.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.200 2003/05/09 21:19:48 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.201 2003/05/16 02:40:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -761,10 +761,17 @@ DoCopy(const CopyStmt *stmt)
761761
copy_file=AllocateFile(filename,PG_BINARY_R);
762762

763763
if (copy_file==NULL)
764+
#ifndefWIN32
764765
elog(ERROR,"COPY command, running in backend with "
765766
"effective uid %d, could not open file '%s' for "
766767
"reading. Errno = %s (%d).",
767768
(int)geteuid(),filename,strerror(errno),errno);
769+
#else
770+
elog(ERROR,"COPY command, running in backend, "
771+
"could not open file '%s' for "
772+
"reading. Errno = %s (%d).",
773+
filename,strerror(errno),errno);
774+
#endif
768775

769776
fstat(fileno(copy_file),&st);
770777
if (S_ISDIR(st.st_mode))
@@ -814,10 +821,17 @@ DoCopy(const CopyStmt *stmt)
814821
umask(oumask);
815822

816823
if (copy_file==NULL)
824+
#ifndefWIN32
817825
elog(ERROR,"COPY command, running in backend with "
818826
"effective uid %d, could not open file '%s' for "
819827
"writing. Errno = %s (%d).",
820828
(int)geteuid(),filename,strerror(errno),errno);
829+
#else
830+
elog(ERROR,"COPY command, running in backend, "
831+
"could not open file '%s' for "
832+
"writing. Errno = %s (%d).",
833+
filename,strerror(errno),errno);
834+
#endif
821835
fstat(fileno(copy_file),&st);
822836
if (S_ISDIR(st.st_mode))
823837
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp