diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-11-30 19:01:28 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-11-30 19:01:28 +0000 |
commit | f44c64c7270ac353278996a01ba765866b25f789 (patch) | |
tree | 186996ec7dc4fc28961ffc60d00c22299f6e7b39 /src/bin/psql/command.c | |
parent | ff5b6c98bf85b8784eb4c124e1cac82aa18a251f (diff) | |
download | postgresql-f44c64c7270ac353278996a01ba765866b25f789.tar.gz postgresql-f44c64c7270ac353278996a01ba765866b25f789.zip |
Quote SHELL arguments only on Win32.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 34b260a30ad..9ce7318c97c 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2004, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.135 2004/11/15 23:15:12 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.136 2004/11/30 19:01:28 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -1563,10 +1563,12 @@ do_shell(const char *command) sys = pg_malloc(strlen(shellName) + 16); sprintf(sys, + /* See EDITOR handling comment for an explaination */ #ifndef WIN32 - "exec " -#endif + "exec %s", shellName); +#else "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); +#endif result = system(sys); free(sys); } |