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 1tuLAX-007ZM2-FB for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 00:50:57 +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 1tuLAV-004mWO-BE for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Mar 2025 00:50:55 +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 1tuLAU-004mWB-9B for pgsql-hackers@lists.postgresql.org; Tue, 18 Mar 2025 00:50:55 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tuLAS-003Pko-0y for pgsql-hackers@postgresql.org; Tue, 18 Mar 2025 00:50:53 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 61C6413833DC; Mon, 17 Mar 2025 20:50:51 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 17 Mar 2025 20:50:51 -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=1742259051; x=1742345451; bh=Im748kD6Hg iT0fEgxGWJ7rhZTVCK51IH9+kJxUKNWEg=; b=EqnrPhgX1VY/Sn4SQaeil50ZW9 s9K72IMttUQw97KiRegrMH/Q7eAY9tekeSs7pXKyKTmN21KYmeUVGiQ8OaA4TcxT SG3OtsJWqIPPGuF3h0vv7LFUhkJgE4g5ilaeOHG2m0epCzUbg5MD6wgmX2awXHNg sCcEaSqaFsNQEwKg4cJYm8GFxkzCnUKNTri8+hgQVRdaDy+tqbVZKk9IuwLIp4lP 3/jcy+DbFE77YgmAiWw/id9hrgcJ4iXUaW4VTMN48Zf/D2SD9tuo2TgIxYGUzFR0 B8THh/NqNpuQpMgw0xrRsakG+Bl7N7IwqNqaJiq5AyoFm+tLdlKSvo4VabRg== 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= 1742259051; x=1742345451; bh=Im748kD6HgiT0fEgxGWJ7rhZTVCK51IH9+k JxUKNWEg=; b=uGU0YPz64m7uE4VKWE1jMJGKflDWVN3fa0VfPmq71pVqti85BBB QT65L+zNTLDYh4qBPkrhcwKXyrQFiG/xEvcQfs1bZnWa6CkTCFjiwJ3N3tkMOvLW 3PlEe/WEBRcGzfGAkfZacGtAL1L1GXmCToQxH4jxoVBp8tTP0yJsGe4/vyoqYFCn jqeBlUbuvuI8DJS3S4rWP9IMLPlBWn0sCvHByNJ22MFB0r024nO1FfvU1cKm33EY nVXl53s3i0Bo6Rf3psSqX2PE+Qj4SFcO9tV2tthCLCXpWRC5GsTFCkrm9BvVNd1r JBpFOXCHk+qCfjjLQPalO7db983V1TDsi2g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugedutddvucetufdoteggodetrf 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; Mon, 17 Mar 2025 20:50:49 -0400 (EDT) Date: Tue, 18 Mar 2025 09:50:27 +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="2+38cXZM9umAIOhK" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2+38cXZM9umAIOhK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 17, 2025 at 10:50:50AM +0100, Anthonin Bonnefoy wrote: > 0001: This introduces the \sendpipeline meta-command and forbid \g in > a pipeline. This is to fix the formatting options of \g that are not > supported in a pipeline. - count=20 -------- - 4 -(1 row) This removal done in the regression tests was not intentional. I have done some reordering of the code around the new meta-command so as things are ordered alphabetically, and applied the result. > 0002: Allows ';' to send a query using extended protocol when within a > pipeline by using PQsendQueryParams with 0 parameters. It is not > possible to send parameters with extended protocol this way and > everything will be propagated through the query string, similar to a > simple query. I like the simplicity of what you are doing here, relying on PSQL_SEND_QUERY being the default so as we use PQsendQueryParams() with no parameters rather than PQsendQuery() when the pipeline mode is not off. How about adding a check on PIPELINE_COMMAND_COUNT when sending a query through this path? Should we check for more scenarios with syncs and flushes as well when sending these queries? -- Michael --2+38cXZM9umAIOhK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfYw1MACgkQnvQgOdby QH2wBhAAhl8FPtJwiJh6/s70dzWtOHntMds+Uvhk+4k7hesW+iNN547mNdgmQch1 7PD+yp/f3ke7d0Z2UWf+5415/mnfrksFw/2syp0kmlVzBrcgebnBJ4QbAjwI39eN Peg8cp1JDliWfpob0SJhliTXuUnUp1sYjv69jHHYTwCbyrarzQ4r1l/wylR4sR+U raZEB6AporC9ej7JYgOK5jADFSTVxefIqPmNdHmCL9KD/HfvynbDUE1h+gN0JZMU 6hWAq5YAgcClayTDHgGhTLYeiLhCnylVierkA1E5elKwV6CVBbFFmEGixYOFl5JK IZpk/tIotYw5NqEc1c7wUf5RgXw58FYszY/DBw+qZ/w/S8BI03pBsc5X0lvmaDfZ uM/TE47FhaIwemBjh6ByptNFR1kJIxlIqApm83QrfsFQEipk3w7HewH2DtXK5OFk bHDTLaKzacZ+zLvENDz5+v6S2BVwHtTxzgX5Rj4y5X8C+iqfVdJMsgCevlR3iY2S F9m6J7RasAmje8lJP5O0BOo7eBZ6Y1DkCGkwV7E7yE65r1aKXVqJn5UAcqLRaXeL aGNYWun2YEdWwN6fKA0aQBaN5uwMplgYear54opIvbuIz6HMci6ixWpejFFC3WoB aP0lv71P0xuAGgKs9rrU/9pjuS9NY+TFoxrfkp1+QCW54lYLnN0= =UUZ3 -----END PGP SIGNATURE----- --2+38cXZM9umAIOhK--