Document the limit on the number of parameters

Started by PG Bug reporting formover 7 years ago5 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/sql-prepare.html
Description:

The backend protocol limits the number of parameters that can be passed for
a prepared statement to 32767 (2 byte signed integer).

As that is something that is independent of the client library, I think this
should be documented in the user facing manual for the Postgres server
somewhere.

I did not find anything in the chapter about PREPARE
https://www.postgresql.org/docs/current/static/sql-prepare.html or about the
backend protocol:
https://www.postgresql.org/docs/current/static/protocol.html nor on the FAQ
page: https://wiki.postgresql.org/wiki/FAQ

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: Document the limit on the number of parameters

On Tue, Jul 17, 2018 at 01:25:08PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/sql-prepare.html
Description:

The backend protocol limits the number of parameters that can be passed for
a prepared statement to 32767 (2 byte signed integer).

As that is something that is independent of the client library, I think this
should be documented in the user facing manual for the Postgres server
somewhere.

I did not find anything in the chapter about PREPARE
https://www.postgresql.org/docs/current/static/sql-prepare.html or about the
backend protocol:
https://www.postgresql.org/docs/current/static/protocol.html nor on the FAQ
page: https://wiki.postgresql.org/wiki/FAQ

Uh, is this something people will care about?

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
#3Stephen Frost
sfrost@snowman.net
In reply to: Bruce Momjian (#2)
Re: Document the limit on the number of parameters

Greetings,

* Bruce Momjian (bruce@momjian.us) wrote:

On Tue, Jul 17, 2018 at 01:25:08PM +0000, PG Doc comments form wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/sql-prepare.html
Description:

The backend protocol limits the number of parameters that can be passed for
a prepared statement to 32767 (2 byte signed integer).

As that is something that is independent of the client library, I think this
should be documented in the user facing manual for the Postgres server
somewhere.

I did not find anything in the chapter about PREPARE
https://www.postgresql.org/docs/current/static/sql-prepare.html or about the
backend protocol:
https://www.postgresql.org/docs/current/static/protocol.html nor on the FAQ
page: https://wiki.postgresql.org/wiki/FAQ

Uh, is this something people will care about?

Seems like a limitation in the backend protocol should probably be
documented in the backend protocol section of the docs..

Thanks!

Stephen

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Stephen Frost (#3)
Re: Document the limit on the number of parameters

Stephen Frost <sfrost@snowman.net> writes:

* Bruce Momjian (bruce@momjian.us) wrote:

On Tue, Jul 17, 2018 at 01:25:08PM +0000, PG Doc comments form wrote:

The backend protocol limits the number of parameters that can be passed for
a prepared statement to 32767 (2 byte signed integer).

Uh, is this something people will care about?

Seems like a limitation in the backend protocol should probably be
documented in the backend protocol section of the docs..

It is: the definition of the Bind message format says that the parameter
count is an int16.

The question is whether this deserves to be cross-referenced from
elsewhere. I agree with Bruce that it seems unlikely to be helpful.

regards, tom lane

#5Stephen Frost
sfrost@snowman.net
In reply to: Tom Lane (#4)
Re: Document the limit on the number of parameters

Greetings Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:

Stephen Frost <sfrost@snowman.net> writes:

* Bruce Momjian (bruce@momjian.us) wrote:

On Tue, Jul 17, 2018 at 01:25:08PM +0000, PG Doc comments form wrote:

The backend protocol limits the number of parameters that can be passed for
a prepared statement to 32767 (2 byte signed integer).

Uh, is this something people will care about?

Seems like a limitation in the backend protocol should probably be
documented in the backend protocol section of the docs..

It is: the definition of the Bind message format says that the parameter
count is an int16.

The question is whether this deserves to be cross-referenced from
elsewhere. I agree with Bruce that it seems unlikely to be helpful.

Ah, I read the original poster as saying that it wasn't in the protocol
docs. If it's there already then I agree, that's sufficient.

Thanks!

Stephen