From 87c3129e2e07ea649942e54de602bca6e5e259e8 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 19 Jul 2006 17:01:24 +0000 Subject: [PATCH] Update WIN32 quoting roles documentation. --- src/include/port.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/include/port.h b/src/include/port.h index e7747a88d9..d7fea81c06 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 "\"" -- GitLab