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 <classicning@gmail.com>
Discussion: https://www.postgresql.org/message-id/dbfb4b65-0aa8-470a-8b87-b6496160b28a@gmail.com
Backpatch-through: 14
This commit is contained in:
Heikki Linnakangas 2026-06-15 11:28:45 +03:00
parent f7fc53d938
commit 8d516d2b99

View file

@ -37,7 +37,7 @@
*/
#define VALID_LONG_MESSAGE_TYPE(id) \
((id) == 'T' || (id) == 'D' || (id) == 'd' || (id) == 'V' || \
(id) == 'E' || (id) == 'N' || (id) == 'A')
(id) == 'E' || (id) == 'N' || (id) == 'A' || (id) == 't')
static void handleSyncLoss(PGconn *conn, char id, int msgLength);