From: Heikki Linnakangas Date: Mon, 15 Jun 2026 08:28:45 +0000 (+0300) Subject: Fix PQdescribePrepared with more than 7498 params X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0511883cae27ec70834c52bbde1863aa11d81e1;p=thirdparty%2Fpostgresql.git Fix PQdescribePrepared with more than 7498 params If a query has more than 7498 params, the ParameterDescription message exceeds the 30000 byte limit on messages that are not specifically marked as possibly being longer than that (VALID_LONG_MESSAGE_TYPE). To fix, add ParameterDescription to the list. Author: Ning Sun Discussion: https://www.postgresql.org/message-id/dbfb4b65-0aa8-470a-8b87-b6496160b28a@gmail.com Backpatch-through: 14 --- diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 78ffb1025d0..9d6a285fb28 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -42,7 +42,8 @@ (id) == PqMsg_FunctionCallResponse || \ (id) == PqMsg_NoticeResponse || \ (id) == PqMsg_NotificationResponse || \ - (id) == PqMsg_RowDescription) + (id) == PqMsg_RowDescription || \ + (id) == PqMsg_ParameterDescription) static void handleFatalError(PGconn *conn);