Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7ba37743
Commit
7ba37743
authored
Nov 06, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for COMSPEC in the right place and supply a reasonable shell
default on Win32.
parent
d2f6c3e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/bin/psql/command.c
src/bin/psql/command.c
+8
-4
No files found.
src/bin/psql/command.c
View file @
7ba37743
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
*
*
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
*
*
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.13
0 2004/11/04 22:25:14
momjian Exp $
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.13
1 2004/11/06 04:29:40
momjian Exp $
*/
*/
#include "postgres_fe.h"
#include "postgres_fe.h"
#include "command.h"
#include "command.h"
...
@@ -1525,7 +1525,11 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
...
@@ -1525,7 +1525,11 @@ do_pset(const char *param, const char *value, printQueryOpt *popt, bool quiet)
#ifndef WIN32
#define DEFAULT_SHELL "/bin/sh"
#define DEFAULT_SHELL "/bin/sh"
#else
#define DEFAULT_SHELL "c:/windows/system32/cmd.exe"
#endif
static
bool
static
bool
do_shell
(
const
char
*
command
)
do_shell
(
const
char
*
command
)
...
@@ -1537,11 +1541,11 @@ do_shell(const char *command)
...
@@ -1537,11 +1541,11 @@ do_shell(const char *command)
char
*
sys
;
char
*
sys
;
const
char
*
shellName
=
NULL
;
const
char
*
shellName
=
NULL
;
shellName
=
getenv
(
"SHELL"
);
#ifdef WIN32
#ifdef WIN32
shellName
=
getenv
(
"COMSPEC"
);
#endif
if
(
shellName
==
NULL
)
if
(
shellName
==
NULL
)
shellName
=
getenv
(
"SHELL"
);
shellName
=
getenv
(
"COMSPEC"
);
#endif
if
(
shellName
==
NULL
)
if
(
shellName
==
NULL
)
shellName
=
DEFAULT_SHELL
;
shellName
=
DEFAULT_SHELL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment