Skip to content

Commit 87c3129

Browse files
committed
Update WIN32 quoting roles documentation.
1 parent 5b8b137 commit 87c3129

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

src/include/port.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
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 $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -94,8 +94,24 @@ extern int find_other_exec(const char *argv0, const char *target,
9494
* It also requires double-quotes around the executable name and
9595
* any files used for redirection. Other args can use single-quotes.
9696
*
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.
99115
*/
100116
#if defined(WIN32) && !defined(__CYGWIN__)
101117
#define SYSTEMQUOTE "\""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy