Add ParameterDescription message to libpq frontend long message types
Ning Sun <classicning@gmail.com>
From: Ning Sun <classicning@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2026-04-01T06:32:17Z
Lists: pgsql-hackers
Attachments
- 0001-add-ParameterDescription-to-long-message-types.patch (text/x-patch) patch 0001
Hi, I'm maintaining a Rust library pgwire to implement postgres wire protocol in rust. While doing a corner case test, I noticed the inconsistency for ParameterDescription between backend and frontend. The backend allows up to 65535 parameters in a prepared statement. But when running Describe on the statement, there is a size limit of 30000 bytes for ParameterDescription on the frontend. This means we can only describe statements with at most ~7500 parameters. For statements exceed the limit, it ends up with error about the message size. This patch simply adds ParameterDescription to VALID_LONG_MESSAGE_TYPE whitelist to remove the cap.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix PQdescribePrepared with more than 7498 params
- 1b79c8d1a581 14 (unreleased) landed
- 0f63b74a4730 15 (unreleased) landed
- 8d516d2b99b3 16 (unreleased) landed
- e4183c667d86 17 (unreleased) landed
- b1ab4bc52a1f 18 (unreleased) landed
- e0511883cae2 19 (unreleased) landed