From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: injection_points: Add support for string comparison in condition
Date: Fri, 14 Aug 2026 05:46:35 +0000
Message-ID: <E1wukkU-00000000VbQ-32oJ@gemulon.postgresql.org> (raw)
injection_points: Add support for string comparison in conditions
injection_points is extended so as a caller can attach a string value to
a point, checked with a value provided at runtime. There are a couple
of use cases where this can be useful, to be able to target points for
specific object names.
PID and string conditions can be combined together, so as a point can be
allowed for a specific process and string value at the same time.
The condition string is capped at 255 characters. As the attach SQL
function now takes an optional condition string, it is no longer STRICT,
and rejects NULL inputs. Empty condition strings are also rejected, as
they don't make sense.
Author: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAA5RZ0tsGHu2h6YLnVu4HiK05q+gTE_9WVUAqihW2LSscAYS-g@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0fd73cdffc18d3914311122bf4fbb5acbae626f3
Modified Files
--------------
.../injection_points/expected/injection_points.out | 43 ++++++++++++++++
.../injection_points/injection_points--1.0.sql | 5 +-
.../modules/injection_points/injection_points.c | 59 +++++++++++++++-------
.../modules/injection_points/injection_points.h | 11 +++-
.../injection_points/sql/injection_points.sql | 14 +++++
5 files changed, 110 insertions(+), 22 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: injection_points: Add support for string comparison in condition
In-Reply-To: <E1wukkU-00000000VbQ-32oJ@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