postgresql/src
Tom Lane 79193c75f8 Fix assorted issues in pg_ctl's pgwin32_CommandLine().
Ensure that the invocation command for postgres or pg_ctl runservice
double-quotes the executable's pathname; failure to do this leads to
trouble when the path contains spaces.

Also, ensure that the path ends in ".exe" in both cases and uses
backslashes rather than slashes as directory separators.  The latter issue
is reported to confuse some third-party tools such as Symantec Backup Exec.

Also, rewrite the function to avoid buffer overrun issues by using a
PQExpBuffer instead of a fixed-size static buffer.  Combinations of
very long executable pathnames and very long data directory pathnames
could have caused trouble before, for example.

Back-patch to all active branches, since this code has been like this
for a long while.

Naoya Anzai and Tom Lane, reviewed by Rajeev Rastogi
2013-11-29 18:34:07 -05:00
..
backend Be sure to release proc->backendLock after SetupLockInTable() failure. 2013-11-29 17:35:09 -05:00
bin Fix assorted issues in pg_ctl's pgwin32_CommandLine(). 2013-11-29 18:34:07 -05:00
common Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
include Fix assorted race conditions in the new timeout infrastructure. 2013-11-29 16:41:00 -05:00
interfaces ECPG: Fix searching for quoted cursor names case-sensitively. 2013-11-27 11:02:13 +01:00
makefiles Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
pl Fix plpython3 expected output. 2013-11-27 14:25:13 +02:00
port Ensure _dosmaperr() actually sets errno correctly. 2013-11-23 18:24:26 -05:00
template Remove leftovers of IRIX port 2013-11-12 06:39:36 -05:00
test Refine our definition of what constitutes a system relation. 2013-11-28 20:57:20 -05:00
timezone Fix whitespace issues found by git diff --check, add gitattributes 2013-11-10 14:48:29 -05:00
tools Fix whitespace 2013-11-13 21:25:52 -05:00
tutorial Modernize string literal syntax in tutorial example. 2013-01-19 17:20:32 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Switch dependency order of libpgcommon and libpgport 2013-10-17 22:02:35 -04:00
Makefile.shlib Remove IRIX port. 2013-10-18 08:14:21 -04:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
nls-global.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00