Index: src/bin/psql/command.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.130
diff -c -c -r1.130 command.c
*** src/bin/psql/command.c	4 Nov 2004 22:25:14 -0000	1.130
--- src/bin/psql/command.c	6 Nov 2004 04:18:05 -0000
***************
*** 1525,1531 ****
--- 1525,1535 ----
  
  
  
+ #ifndef WIN32
  #define DEFAULT_SHELL "/bin/sh"
+ #else
+ #define DEFAULT_SHELL "c:/windows/system32/cmd.exe"
+ #endif
  
  static bool
  do_shell(const char *command)
***************
*** 1537,1547 ****
  		char	   *sys;
  		const char *shellName = NULL;
  
  #ifdef WIN32
- 		shellName = getenv("COMSPEC");
- #endif
  		if (shellName == NULL)
! 			shellName = getenv("SHELL");
  		if (shellName == NULL)
  			shellName = DEFAULT_SHELL;
  
--- 1541,1551 ----
  		char	   *sys;
  		const char *shellName = NULL;
  
+ 		shellName = getenv("SHELL");
  #ifdef WIN32
  		if (shellName == NULL)
! 			shellName = getenv("COMSPEC");
! #endif
  		if (shellName == NULL)
  			shellName = DEFAULT_SHELL;
  
