From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
Date: Thu, 27 Feb 2020 02:23:33 +0000
Message-ID: <E1j78pp-0005GT-De@gemulon.postgresql.org> (raw)
createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
The original coding failed to properly quote those arguments, leading to
failures when using quotes in the values used. As the quoting can be
encoding-sensitive, the connection to the backend needs to be taken
before applying the correct quoting.
Author: Michael Paquier
Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/20200214041004.GB1998@paquier.xyz
Backpatch-through: 9.5
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/49300e4cf2da9988eb5caa94f18779cfa72ec698
Modified Files
--------------
src/bin/scripts/createdb.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: createdb: Fix quoting of --encoding, --lc-ctype and --lc-collate
In-Reply-To: <E1j78pp-0005GT-De@gemulon.postgresql.org>
References: <E1j78pp-0005GT-De@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox