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 1mdHML-0003Ay-Q7 for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Oct 2021 19:34:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mdHMK-0000Ga-Hy for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Oct 2021 19:34:44 +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 1mdHMK-0000GR-AD for pgsql-bugs@lists.postgresql.org; Wed, 20 Oct 2021 19:34:44 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdHMD-0002U8-5X for pgsql-bugs@lists.postgresql.org; Wed, 20 Oct 2021 19:34:43 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 13CD33200FA9; Wed, 20 Oct 2021 15:34:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 20 Oct 2021 15:34:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=W+xJBbBvsa171na7CJfhr8t64d1h0y9yW6sQ3Gg1cj4=; b=MuUH4XRP iBd08KobMjM8Q+Zmk2m76M+fYqVi5LGHHMRqcKpMMiur0eGi9LXdfk01Erf3qC/P wYor/bvByt8aLv3xokBgfC9M0W4oObPvhBHMWgUnXRbtvq1wxZD8RNyD/8nb1gBN OBFEm+R7QucAMzaMdcoAHsn5cmIxKJueVIDe0WrjDxM8QnRS4IrKGfainSsUtUZL gEeBpBZyz8T+e14fhTyTgSKo1vd6X3PApdtuo/XbUqdFpsTCSvZ6sllEJKJTttB1 DkWVVuH0bQznDxSQ4XQnVtDOiEqiVFHGEBZAcgBwB7OGX0d8Ru0Czc4JB4A7Kv5O 3z2k3LmnnP57cQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvgedgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeev jedufeeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Oct 2021 15:34:34 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 10ED32A05E8; Wed, 20 Oct 2021 16:34:31 -0300 (-03) Date: Wed, 20 Oct 2021 16:34:31 -0300 From: Alvaro Herrera To: "David G. Johnston" Cc: Daniel Verite , RekGRpth , PostgreSQL mailing lists Subject: Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR Message-ID: <202110201934.4w3rlxmsbf5b@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Oct-20, David G. Johnston wrote: > It seems desirable to talk about the multi-command limitation directly in > the libpq chapter of the documentation and only refer to the protocol > documentation for "additional reading". We should not assume the reader of > this material knows that extended protocol implies single command. Sure. > It is too late to change now but why did we feel the need to make > PQsendQuery work in Pipeline mode at all? Mostly, I saw no reason not to make it work for the common case. > Lacking a decent answer it is probably worth saying that while > PQsendQuery works it behaves like PQsendQueryParams without any > parameters specified. In particular, it does not allow for multiple > commands to be specified in the query. Sure. > Combine that with a mention that all interactions with the server are done > using v3 of the extended protocol. Maybe by rewriting the above as: > > "While in pipeline mode, communication with the server is done using v3 of > the extended query protocol. This means that the pipeline API can be used > to communicate with all servers that support the protocol. It also means > that it is not possible to include multiple commands in a single query (see > the note in Protocol XRef for details)." Hmm, this seems to get into too much detail for that particular spot. Also, this paragraph is there precisely to let the reader know they can use the pipeline mode with older server versions. I don't disagree with rewording the paragraph in a similar way to what you outline in the first two phrases (not exactly that though), but the third one you propose seems a bit out of place. Why not add a few words to PQsendQuery() doc blurb instead? -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/