git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: d69ffd6) | patch
Replace SYSTEMQUOTEs with Windows-specific wrapper functions.
Mon, 5 May 2014 13:07:40 +0000 (16:07 +0300)
Mon, 5 May 2014 13:07:40 +0000 (16:07 +0300)
commit a692ee5870f0f442565b4c4bff367094599e9bdf
Replace SYSTEMQUOTEs with Windows-specific wrapper functions.

It's easy to forget using SYSTEMQUOTEs when constructing command strings
for system() or popen(). Even if we fix all the places missing it now, it is
bound to be forgotten again in the future. Introduce wrapper functions that
do the the extra quoting for you, and get rid of SYSTEMQUOTEs in all the
callers.

We previosly used SYSTEMQUOTEs in all the hard-coded command strings, and
this doesn't change the behavior of those. But user-supplied commands, like
archive_command, restore_command, COPY TO/FROM PROGRAM calls, as well as
pgbench's \shell, will now gain an extra pair of quotes. That is desirable,
but if you have existing scripts or config files that include an extra
pair of quotes, those might need to be adjusted.

Reviewed by Amit Kapila and Tom Lane
18 files changed:
configure.in diff | blob | blame | history
contrib/pg_upgrade/check.c diff | blob | blame | history
contrib/pg_upgrade/controldata.c diff | blob | blame | history
contrib/pg_upgrade/exec.c diff | blob | blame | history
src/bin/initdb/initdb.c diff | blob | blame | history
src/bin/pg_ctl/pg_ctl.c diff | blob | blame | history
src/bin/pg_dump/pg_dumpall.c diff | blob | blame | history
src/bin/psql/command.c diff | blob | blame | history
src/include/port.h diff | blob | blame | history
src/interfaces/ecpg/test/pg_regress_ecpg.c diff | blob | blame | history
src/interfaces/libpq/Makefile diff | blob | blame | history
src/interfaces/libpq/bcc32.mak diff | blob | blame | history
src/interfaces/libpq/win32.mak diff | blob | blame | history
src/port/system.c [new file with mode: 0644] blob
src/test/isolation/isolation_main.c diff | blob | blame | history
src/test/regress/pg_regress.c diff | blob | blame | history
src/test/regress/pg_regress_main.c diff | blob | blame | history
src/tools/msvc/Mkvcbuild.pm diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /