pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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-0005GH-Bu@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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/943affb3d1db38ba0960ee9a0666ea2598b78f1f

Modified Files
--------------
src/bin/scripts/createdb.c        | 29 +++++++++++++++++++----------
src/bin/scripts/t/020_createdb.pl | 26 +++++++++++++++++++++++++-
2 files changed, 44 insertions(+), 11 deletions(-)



view thread (12+ messages)  latest in thread

Message-ID: <E1j78pp-0005GH-Bu@gemulon.postgresql.org>
Permalink:  ../E1j78pp-0005GH-Bu@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1j78pp-0005GH-Bu@gemulon.postgresql.org

 · 

reply

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-0005GH-Bu@gemulon.postgresql.org>
  References: <E1j78pp-0005GH-Bu@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