public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dave Cramer <[email protected]>
To: PostgreSQL Hackers <[email protected]>
To: Austin Bonander <[email protected]>
Subject: Patch for bind message regarding the number of parameters and result column format codes
Date: Wed, 20 May 2026 18:12:34 -0700
Message-ID: <CADK3HHLv-4nU8wFNEodvNedtWP2qBnZvL-9RZzd11mMt7U6hQA@mail.gmail.com> (raw)
While talking to Austin he noted that the docs for the number of parameters
is actually an unsigned integer.
This patch corrects that.
See
1. Parameter format codes count (line 4323) — read at postgres.c:1725
2. Parameter values count (line 4348) — read at postgres.c:1734
3. Result-column format codes count (line 4396) — read at postgres.c:2017
Dave Cramer
Attachments:
[application/octet-stream] 0001-doc-clarify-Bind-parameter-count-is-unsigned-Int16.patch (1.6K, 3-0001-doc-clarify-Bind-parameter-count-is-unsigned-Int16.patch)
download | inline diff:
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 49f81676712..4da26a6cba3 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -4326,7 +4326,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
or that the parameters all use the default format (text);
or one, in which case the specified format code is applied
to all parameters; or it can equal the actual number of
- parameters.
+ parameters. This is an unsigned 16-bit integer, so the
+ maximum number of parameter format codes is 65535.
</para>
</listitem>
</varlistentry>
@@ -4347,6 +4348,8 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
<para>
The number of parameter values that follow (possibly zero).
This must match the number of parameters needed by the query.
+ This is an unsigned 16-bit integer, so the maximum number of
+ parameters is 65535.
</para>
</listitem>
</varlistentry>
@@ -4397,7 +4400,9 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
(text);
or one, in which case the specified format code is applied
to all result columns (if any); or it can equal the actual
- number of result columns of the query.
+ number of result columns of the query. This is an unsigned
+ 16-bit integer, so the maximum number of result-column format
+ codes is 65535.
</para>
</listitem>
</varlistentry>
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Patch for bind message regarding the number of parameters and result column format codes
In-Reply-To: <CADK3HHLv-4nU8wFNEodvNedtWP2qBnZvL-9RZzd11mMt7U6hQA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox