Add ParameterDescription message to libpq frontend long message types

From: Ning Sun <classicning(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Add ParameterDescription message to libpq frontend long message types
Date: 2026-04-01 06:32:17
Message-ID: dbfb4b65-0aa8-470a-8b87-b6496160b28a@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Attachment Content-Type Size
0001-add-ParameterDescription-to-long-message-types.patch text/x-patch 829 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-04-01 06:33:28 Re: table AM option passing
Previous Message Peter Smith 2026-04-01 06:16:00 DOCS - DROP SUBSCRIPTION does not document parameter "IF EXISTS"