|
6 | 6 | * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group |
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California |
8 | 8 | * |
9 | | - * $PostgreSQL: pgsql/src/include/port.h,v 1.94 2006/07/11 13:54:24 momjian Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/include/port.h,v 1.95 2006/07/19 17:01:24 momjian Exp $ |
10 | 10 | * |
11 | 11 | *------------------------------------------------------------------------- |
12 | 12 | */ |
@@ -94,8 +94,24 @@ extern int find_other_exec(const char *argv0, const char *target, |
94 | 94 | * It also requires double-quotes around the executable name and |
95 | 95 | * any files used for redirection. Other args can use single-quotes. |
96 | 96 | * |
97 | | - * See the "Notes" section about quotes at: |
98 | | - * http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM |
| 97 | + * From http://www.computerhope.com/cmd.htm: |
| 98 | + * |
| 99 | + * 1. If all of the following conditions are met, then quote characters |
| 100 | + * on the command line are preserved: |
| 101 | + * |
| 102 | + * - no /S switch |
| 103 | + * - exactly two quote characters |
| 104 | + * - no special characters between the two quote characters, where special |
| 105 | + * is one of: &<>()@^| |
| 106 | + * - there are one or more whitespace characters between the the two quote |
| 107 | + * characters |
| 108 | + * - the string between the two quote characters is the name of an |
| 109 | + * executable file. |
| 110 | + * |
| 111 | + * 2. Otherwise, old behavior is to see if the first character is a quote |
| 112 | + * character and if so, strip the leading character and remove the last |
| 113 | + * quote character on the command line, preserving any text after the last |
| 114 | + * quote character. |
99 | 115 | */ |
100 | 116 | #if defined(WIN32) && !defined(__CYGWIN__) |
101 | 117 | #define SYSTEMQUOTE "\"" |
|
0 commit comments