From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add backend-only appendStringInfoStringQuoted
Date: Tue, 10 Dec 2019 20:14:20 +0000
Message-ID: <E1ieltk-0002sm-Ly@gemulon.postgresql.org> (raw)
Add backend-only appendStringInfoStringQuoted
This provides a mechanism to emit literal values in informative
messages, such as query parameters. The new code is more complex than
what it replaces, primarily because it wants to be more efficient.
It also has the (currently unused) additional optional capability of
specifying a maximum size to print.
The new function lives out of common/stringinfo.c so that frontend users
of that file need not pull in unnecessary multibyte-encoding support
code.
Author: Álvaro Herrera and Alexey Bashtanov, after a suggestion from Andres Freund
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/20190920203905.xkv5udsd5dxfs6tr@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6cafde1bd43f1c28b044953cac2f2999eb425b22
Modified Files
--------------
src/backend/tcop/postgres.c | 11 +----
src/backend/utils/mb/Makefile | 1 +
src/backend/utils/mb/README | 1 +
src/backend/utils/mb/stringinfo_mb.c | 86 +++++++++++++++++++++++++++++++++++
src/include/mb/stringinfo_mb.h | 24 ++++++++++
src/pl/plpgsql/src/pl_exec.c | 37 +++++----------
src/test/regress/expected/plpgsql.out | 14 ++++++
src/test/regress/sql/plpgsql.sql | 13 ++++++
8 files changed, 152 insertions(+), 35 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: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Add backend-only appendStringInfoStringQuoted
In-Reply-To: <E1ieltk-0002sm-Ly@gemulon.postgresql.org>
References: <E1ieltk-0002sm-Ly@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