From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add backend-only appendStringInfoStringQuoted |
Date: | 2019-12-10 20:14:20 |
Message-ID: | E1ieltk-0002sm-Ly@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2019-12-10 20:24:50 | pgsql: Cosmetic cleaning of pg_config.h.win32 |
Previous Message | Tom Lane | 2019-12-10 18:17:21 | pgsql: In pg_ctl, work around ERROR_SHARING_VIOLATION on the postmaster |