diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-03-16 21:27:23 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-03-16 21:27:23 +0000 |
commit | 712f053587b552769d1d3f6fe0ec03ab79c05d26 (patch) | |
tree | a5b5c283490cf9e0320990ad31e85486ef071f02 /src/bin/psql/command.c | |
parent | ca667973084be68fbe4f5b3e03599d7c3b9ad93e (diff) |
Add sprintf support, that were were missing.
Add support for snprintf '+', 'h', and %* length settings.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 01ff7fb3957..351813feb8e 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.141 2005/03/11 17:20:34 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.142 2005/03/16 21:27:23 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -1574,11 +1574,13 @@ do_shell(const char *command) shellName = DEFAULT_SHELL; sys = pg_malloc(strlen(shellName) + 16); +#ifndef WIN32 sprintf(sys, /* See EDITOR handling comment for an explaination */ -#ifndef WIN32 "exec %s", shellName); #else + sprintf(sys, + /* See EDITOR handling comment for an explaination */ "%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE); #endif result = system(sys); |