]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix PQdescribePrepared with more than 7498 params
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 15 Jun 2026 08:28:45 +0000 (11:28 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 15 Jun 2026 08:38:40 +0000 (11:38 +0300)
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

src/interfaces/libpq/fe-protocol3.c

index 1d0199132970192d50f4472ad18dfd82c5c1a63a..3c6f927eac9e0f66f00a8bde33538996820a92a3 100644 (file)
@@ -39,7 +39,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);