aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-07-19 17:01:24 +0000
committerBruce Momjian <bruce@momjian.us>2006-07-19 17:01:24 +0000
commit87c3129e2e07ea649942e54de602bca6e5e259e8 (patch)
treeb1387a176243664923fb826b81eecb7420552926
parent5b8b137b1635481cb5168e615260147b3878513f (diff)
downloadpostgresql-87c3129e2e07ea649942e54de602bca6e5e259e8.tar.gz
postgresql-87c3129e2e07ea649942e54de602bca6e5e259e8.zip
Update WIN32 quoting roles documentation.
-rw-r--r--src/include/port.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/include/port.h b/src/include/port.h
index e7747a88d9b..d7fea81c061 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.94 2006/07/11 13:54:24 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.95 2006/07/19 17:01:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -94,8 +94,24 @@ extern int find_other_exec(const char *argv0, const char *target,
* It also requires double-quotes around the executable name and
* any files used for redirection. Other args can use single-quotes.
*
- * See the "Notes" section about quotes at:
- * http://home.earthlink.net/~rlively/MANUALS/COMMANDS/C/CMD.HTM
+ * From http://www.computerhope.com/cmd.htm:
+ *
+ * 1. If all of the following conditions are met, then quote characters
+ * on the command line are preserved:
+ *
+ * - no /S switch
+ * - exactly two quote characters
+ * - no special characters between the two quote characters, where special
+ * is one of: &<>()@^|
+ * - there are one or more whitespace characters between the the two quote
+ * characters
+ * - the string between the two quote characters is the name of an
+ * executable file.
+ *
+ * 2. Otherwise, old behavior is to see if the first character is a quote
+ * character and if so, strip the leading character and remove the last
+ * quote character on the command line, preserving any text after the last
+ * quote character.
*/
#if defined(WIN32) && !defined(__CYGWIN__)
#define SYSTEMQUOTE "\""