From cbc8d65639344c390a1d1a7f646c186ff3ad8693 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 29 Jun 2015 12:42:52 -0400 Subject: Code + docs review for escaping of option values (commit 11a020eb6). Avoid memory leak from incorrect choice of how to free a StringInfo (resetStringInfo doesn't do it). Now that pg_split_opts doesn't scribble on the optstr, mark that as "const" for clarity. Attach the commentary in protocol.sgml to the right place, and add documentation about the user-visible effects of this change on postgres' -o option and libpq's PGOPTIONS option. --- doc/src/sgml/ref/postgres-ref.sgml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'doc/src/sgml/ref/postgres-ref.sgml') diff --git a/doc/src/sgml/ref/postgres-ref.sgml b/doc/src/sgml/ref/postgres-ref.sgml index 3b5617181ca..e2e99092428 100644 --- a/doc/src/sgml/ref/postgres-ref.sgml +++ b/doc/src/sgml/ref/postgres-ref.sgml @@ -284,12 +284,18 @@ PostgreSQL documentation - The command-line-style options specified in extra-options are passed to all server processes started by this - postgres process. If the option string contains - any spaces, the entire string must be quoted; multiple - option invocations are appended. + postgres process. + + + + Spaces within extra-options are + considered to separate arguments, unless escaped with a backslash + (\); write \\ to represent a literal + backslash. Multiple arguments can also be specified via multiple + uses of -- cgit v1.2.3