pgpool: Prevent FATAL error when non-existing prepared statement is giv

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgpool-committers(at)lists(dot)postgresql(dot)org
Subject: pgpool: Prevent FATAL error when non-existing prepared statement is giv
Date: 2025-10-03 01:29:20
Message-ID: E1v4Ubo-007nAe-1J@gothos.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-committers

Prevent FATAL error when non-existing prepared statement is given.

Previously Bind() raised FATAL error if non-existing prepared statement was given.
This is different from PostgreSQL's behavior.

\bind_named stmt2 'baz' \g
ERROR: prepared statement "stmt2" does not exist

This commit let Bind() check the existence of prepared statement and
if it does not exist, send an ERROR message to frontend. Note that no
log is left in the log file. This is not preferred action but currently
it's not possible to leave log.

Backpatch-through: v4.2

Branch
------
V4_4_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=50e35746a33f09b31fa9ff6947e0b5a515682516

Modified Files
--------------
src/protocol/pool_proto_modules.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)

Browse pgpool-committers by date

  From Date Subject
Next Message Tatsuo Ishii 2025-10-03 01:29:26 pgpool: Prevent FATAL error when non-existing prepared statement is giv
Previous Message Tatsuo Ishii 2025-10-03 01:29:15 pgpool: Prevent FATAL error when non-existing prepared statement is giv