*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.130 2004/11/04 22:25:14 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.131 2004/11/06 04:29:40 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
+#ifndef WIN32
#define DEFAULT_SHELL "/bin/sh"
+#else
+#define DEFAULT_SHELL "c:/windows/system32/cmd.exe"
+#endif
static bool
do_shell(const char *command)
char *sys;
const char *shellName = NULL;
+ shellName = getenv("SHELL");
#ifdef WIN32
- shellName = getenv("COMSPEC");
-#endif
if (shellName == NULL)
- shellName = getenv("SHELL");
+ shellName = getenv("COMSPEC");
+#endif
if (shellName == NULL)
shellName = DEFAULT_SHELL;