Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRd9c-00018T-Ay for pgsql-general@arkaria.postgresql.org; Thu, 23 Apr 2020 14:48:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRd9b-0006gu-8O for pgsql-general@arkaria.postgresql.org; Thu, 23 Apr 2020 14:48:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRd9Z-0006gl-6u for pgsql-general@lists.postgresql.org; Thu, 23 Apr 2020 14:48:39 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRd9U-0004Q5-Os for pgsql-general@postgresql.org; Thu, 23 Apr 2020 14:48:36 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 600EB394; Thu, 23 Apr 2020 10:48:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 23 Apr 2020 10:48:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=o QhBL2tiiFRfnJfTrsBm3tC5Y9pgRQMF3yGskmylMxw=; b=fwwpDa38YtUpVK5Ro 404UfT176M7qOx71wSUMy9RB0f1H4fMAsh3KhziAxfFscBjXL08jo56bVDHsoRsj sUIeGfox19J3Qxrx9aecwJS5UhyEfMZHRU+dvXQyRShRzfGazNlq9KB94FyrcGPY TfG2x1HodW1qO8DZ941V7Pd72ymULu/2yPHg4GhcRwdxtdvPhxmRs5tBDGyfr/IL xLqj5tYBplBdpntqHwCBbj3nIFxjQEyIbRLiVyNhk4S6aTbR8vHAjsRbce+7Dl8G dZqfVVIRxmNUbzU/u6n6074qZf6zmck7T9LyVoR/G6vkMOrxt1W+1xPdwmPsrnJW ml61Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=oQhBL2tiiFRfnJfTrsBm3tC5Y9pgRQMF3yGskmylM xw=; b=aMB38kNcd+xnDQE0ymBYUGjgvwe6Z7tS1Ifpm/WBZySXrSdikg0bgOSm/ hCdnWq3mYJlg7pz6cbLbKgCW6+R2yb/JESL35A236Z6X1pD5ATDup8dZ1yEZq2x9 RbF5wt6dqc17UMnLRG0XYCF4rzGfIWr3kDT7VyLoawzFn7Fkle6EpbiWrDmm+ZvG aCClP2Q1ub2t3l1pF8s/iBOETJzp0YiSTag/ed+fjx5GOf3PzLfMHr2tpBjnSwKE IunksVKZu3vsfKKo69e6t6XnOxOOZql162zFBAhs5IthS1WI5Z5hWpxvgwQGRdbR FlMJaSnmw5triUBVjZrX4hqN/wyZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeelgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehlihhnkhgvughinhdrtghomhenucfkphepleejrdduudefrddv tdejrddufeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.10] (97-113-207-138.tukw.qwest.net [97.113.207.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 184E63065D3E; Thu, 23 Apr 2020 10:48:28 -0400 (EDT) Subject: Re: parameter limit To: Scott Ribe , pgsql-general@postgresql.org References: <0A6380C4-E0E0-4554-B98C-0889CF03C4C1@elevated-dev.com> From: Adrian Klaver Message-ID: <6e6ac332-087c-7a65-3340-e4c50b916f54@aklaver.com> Date: Thu, 23 Apr 2020 07:48:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <0A6380C4-E0E0-4554-B98C-0889CF03C4C1@elevated-dev.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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; } > > -- > Scott Ribe > scott_ribe@elevated-dev.com > https://www.linkedin.com/in/scottribe/ > > > > > -- Adrian Klaver adrian.klaver@aklaver.com