Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tulN9-00BOHo-7b for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 04:49:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tulN7-00Cs8g-NA for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 04:49:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tulN7-00Cs8Y-1H for pgsql-hackers@lists.postgresql.org; Wed, 19 Mar 2025 04:49:41 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tulN4-003dFh-1h for pgsql-hackers@postgresql.org; Wed, 19 Mar 2025 04:49:40 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id 4DEB911401DB; Wed, 19 Mar 2025 00:49:37 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Wed, 19 Mar 2025 00:49:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1742359777; x=1742446177; bh=vTSoAaO9nG mCD/VGed9ppJhTUoMaDIXCqR5Bwuds0Bk=; b=Os9UQg9tUpYsYtzs+Ior0EsXMK cIwx7ZhOL7pnU1bn0fFXoh1qRSA5RPLn73O76PN5OOAiC4ILYDQ2SPRndTbclN4E r+eeeMIfyfA5PA18N+QwZJGaKs5XCMmJ7XI8i4nXictO1OAbJYSE9k2NPjX8GTcj JEl/1iXVqSp1VaqjXxV8ogWlumZG+08J42CWsazp1zBJQ25XvchtbDl5C4Z3e5dK H3WyefDblPKtnAp9+1ZEQ7tyHndyIMH8r5BG3S8fCQoeJwiSV+OV3jrDQJ0BDwjl E2K4EgNJWE3i3/lKZ9TNS8J+jNUp6YoVeJq2lYcKs2cL8IeDvJKJWtxbbUHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742359777; x=1742446177; bh=vTSoAaO9nGmCD/VGed9ppJhTUoMaDIXCqR5 Bwuds0Bk=; b=xPnrll5mVrPW/OZ5z4NwlNftdEL0Z8lN3GFeAx42gjItFzeNIhp mkEY35PidV1+Z1tyePEp3GcJzFOl3cIwQMAA12x++3WDuErXW2GyT1mOBposW3G7 bHU2mGIXevzcDZeGZQ2R0O1Ra02FF2OOyuHs3/VwmAIR/kpVNFlvlCdZHRrdbQAb 9c2MVRi4JURGXGWVo5Ewwy4B2wuvdwVZyyIqZQTCXBZk+V6g2qf41zk67KcFR+kr sbxCsNlCglqtksdFSp2Juslt+NsO8asYeDktnYPTIufMYQU68V9c2FfF4TVFwjVL vt+Z2trEQUKgre4gyPL24t8+PO+gWVWtcig== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeeggeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefu kfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivg hruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhep teelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggv lhesphgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtph houhhtpdhrtghpthhtoheprghnthhhohhnihhnrdgsohhnnhgvfhhohiesuggrthgrugho ghhhqhdrtghomhdprhgtphhtthhopegurghnihgvlhesmhgrnhhithhouhdqmhgrihhlrd horhhgpdhrtghpthhtohepphhoshhtghhrvghssehjvghlthgvfhdrnhhlpdhrtghpthht ohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 00:49:35 -0400 (EDT) Date: Wed, 19 Mar 2025 13:49:23 +0900 From: Michael Paquier To: Anthonin Bonnefoy Cc: Daniel Verite , Jelte Fennema-Nio , PostgreSQL Hackers Subject: Re: Add Pipelining support in psql Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Fhnh6ohuBxQY06fc" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Fhnh6ohuBxQY06fc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 18, 2025 at 09:55:21AM +0100, Anthonin Bonnefoy wrote: > I've added additional tests when piping queries with ';': > - I've reused the same scenario with \sendpipeline: single query, > multiple queries, flushes, syncs, using COPY... > - Using ';' will replace the unnamed prepared statement. It's a bit > different from expected as a simple query will delete the unnamed > prepared statement. > - Sending an extended query prepared with \bind using a ';' on a > newline, though this is not specific to pipelining. The scanned > semicolon triggers the call to SendQuery, processing the buffered > extended query. It's a bit unusual but that's the current behaviour. The tests could be much more organized, particularly for the "sinple" and "multiple" and COPY cases, rather than being treated as two different groups at different locations of psql_pipeline.sql. I've spent some time reorganizing all that. A second thing that was a bit itchy is the use of ";" for what's a semicolon, and we use this term in the psql docs to refer to queries terminated by that. The whole paragraph could be simplified a bit more, mentioning that everything in a pipeline uses the extended protocol, while \bind & co are more like options. The description of PIPELINE_COMMAND_COUNT could be simpler, and the part about the pending results can be more general now so I've removed it. With all that set, I've applied the patch. If you have more suggestions, please feel free to mention them. -- Michael --Fhnh6ohuBxQY06fc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfaTNIACgkQnvQgOdby QH3mIA//Svo6TPV75rkGZmVrNFchCD9ZiBOFT5rfVn/CcR4gkVMTVESoC8IsJU79 0gL8VkB+UEZcxyLZ28l75F9WNRBbqBUbLop9X3Y+7633z3ao4JFT3SiuHA0hr54a 4rEPJg1HjqibqZz65WgPnTdSG87tsdxcr1ryquj0A6EOgWE7cJQiAhnnPf0PG0X5 7asjd+H8MgGxvPuTHrFWjqMRH7rFLKaZZA94EcJ5M9pt7Zutjec8RM7eOCvWDvsf gCp2ux3rFu4/xKmGKLwzKfpRayE+aVxgMD0iEO0hLpZF5wt8mM94asQdYW1CqRSS ZpFagcz4/eDH/yi08RplCTgG1LTEARIl6NBQEWWCiau9/i30iIS8OA00AAOBVA80 Y9Yc3Uv/ni8VSHg+uHtnKe2YrtpRpnKWO5bBU+Ul2kFxH9O/9qgWUF1U+4aP871M reS7NH85lJ8gfQTOnbAsq2HcFPQyXT0Qc0a9C3p/t1IxAIJe97Q7Ieb8fx2q7Qhv dDBeeYzT2RWB/Wa187D/+djZZBC1akXGyLnGqfvH1s2AwlOhND4Kw0TCeBEeRMXc LyNIhOQl1QhFanPWXC0HKLC575+Z/KRPrdeuBycJKCN9FAOe8USISVE1s2hhNEAn wFGofXxyLmQzqXhdr33+htZXmBELyWcMDhaRYxAsDkpeW0Eb48E= =hVVP -----END PGP SIGNATURE----- --Fhnh6ohuBxQY06fc--