pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_clean_ascii(): escape bytes rather than lose them
Date: Tue, 13 Sep 2022 14:11:08 +0000
Message-ID: <E1oY6d2-000AWg-3g@gemulon.postgresql.org> (raw)

pg_clean_ascii(): escape bytes rather than lose them

Rather than replace each unprintable byte with a '?' character, replace
it with a hex escape instead. The API now allocates a copy rather than
modifying the input in place.

Author: Jacob Champion <jchampion@timescale.com>
Discussion: https://www.postgresql.org/message-id/CAAWbhmgsvHrH9wLU2kYc3pOi1KSenHSLAHBbCVmmddW6-mc_=w@mail.gmail...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/45b1a67a0fcb3f1588df596431871de4c93cb76f

Modified Files
--------------
src/backend/postmaster/postmaster.c |  6 +----
src/backend/utils/misc/guc.c        | 22 ++++++++++++++--
src/common/string.c                 | 52 ++++++++++++++++++++++++++++++-------
src/include/common/string.h         |  2 +-
4 files changed, 65 insertions(+), 17 deletions(-)



Message-ID: <E1oY6d2-000AWg-3g@gemulon.postgresql.org>
Permalink:  ../E1oY6d2-000AWg-3g@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oY6d2-000AWg-3g@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: peter@eisentraut.org
  Subject: Re: pgsql: pg_clean_ascii(): escape bytes rather than lose them
  In-Reply-To: <E1oY6d2-000AWg-3g@gemulon.postgresql.org>
  References: <E1oY6d2-000AWg-3g@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