From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: parameter limit |
Date: | 2020-04-23 14:54:27 |
Message-ID: | CAKFQuwbGy6X4r5n8Ryyd=avFLX2a_L_RU=NnRCFtrQYMOrx1Lg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thursday, April 23, 2020, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> On 4/23/20 7:33 AM, Scott Ribe wrote:
>
>> In libpq, PQexecParams has nParams as type int. So on any reasonable
>> platform, that's at least 4 bytes. My question then is: when I see
>> documented limits of 65535 params in various drivers and libraries, that is
>> NOT a restriction of libpq nor of the protocol, but rather an arbitrary
>> limit of the driver/library, correct?
>>
>
> No.
>
> From:
>
> src/interfaces/libpq/fe-exec.c
>
> if (nParams < 0 || nParams > 65535)
> {
> printfPQExpBuffer(&conn->errorMessage,
> libpq_gettext("number of
> parameters must be between 0 and 65535\n"));
> return 0;
> }
>
Or, from the specification for the Bind Message in the documentation:
https://www.postgresql.org/docs/12/protocol-message-formats.html
Int16
The number of parameter values that follow
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | servetturan | 2020-04-23 14:59:57 | |
Previous Message | Adrian Klaver | 2020-04-23 14:48:27 | Re: parameter limit |