| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Fix escaping in generated recovery.conf file. |
| Date: | 2013-05-20 16:51:13 |
| Message-ID: | E1UeTIn-00074l-Gb@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix escaping in generated recovery.conf file.
In the primary_conninfo line that "pg_basebackup -R" generates, single
quotes in parameter values need to be escaped into \\'; the libpq parser
requires the quotes to be escaped into \', and recovery.conf parser requires
the \ to be escaped into \\.
Also, don't quote parameter values unnecessarily, to make the connection
string prettier. Most options in a libpq connection string don't need
quoting.
Reported by Hari Babu, closer analysis by Zoltan Boszormenyi, although I
didn't use his patch.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/30b5ede7157e34e77c7914b8ecfd55aa8da6edc3
Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 101 +++++++++++++++++++++++++++++----
1 files changed, 89 insertions(+), 12 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2013-05-21 01:14:16 | pgsql: Documentation spell checking and markup improvements |
| Previous Message | Tom Lane | 2013-05-20 02:03:41 | pgsql: Clarify documentation of EXPLAIN (TIMING OFF) option. |