Fix SQLSTATE for Bind referencing a nonexistent prepared statement

From: Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp>
To: "pgpool-hackers(at)lists(dot)postgresql(dot)org" <pgpool-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fix SQLSTATE for Bind referencing a nonexistent prepared statement
Date: 2026-10-14 00:59:38
Message-ID: OS9P286MB648613F6A2FF5F17A4D64684949D2@OS9P286MB6486.JPNP286.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-hackers

Hi,

The attached patch fixes the SQLSTATE returned when Bind references
a nonexistent prepared statement.

Pgpool-II returned XX000 (internal_error), whereas PostgreSQL returns
26000 (invalid_sql_statement_name). The patch changes the SQLSTATE to
26000 to match PostgreSQL.

This issue was originally reported here:

https://github.com/pgpool/pgpool2/issues/180

Best regards,

Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/

Attachment Content-Type Size
v1-0001-Fix-SQLSTATE-for-Bind-referencing-a-nonexistent-p.patch application/octet-stream 1.4 KB

Responses

Browse pgpool-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2026-10-14 01:04:40 Re: Fix SQLSTATE for Bind referencing a nonexistent prepared statement
Previous Message Koshino Taiki 2026-10-14 00:57:36 Fix extended-protocol DISCARD handling.