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 1tpbQf-008mJL-Q8 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Mar 2025 23:12:01 +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 1tpbQe-00Au1t-0U for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Mar 2025 23:12:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tpbQd-00Au1k-Dt for pgsql-hackers@lists.postgresql.org; Tue, 04 Mar 2025 23:11:59 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tpbQZ-000zGk-29 for pgsql-hackers@postgresql.org; Tue, 04 Mar 2025 23:11:59 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 54BCA25401A0; Tue, 4 Mar 2025 18:11:54 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 04 Mar 2025 18:11:54 -0500 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=1741129914; x=1741216314; bh=ycIWfTCAE8 1YU13ulZ1oGMari2euAvaSYxd3yWAS1tU=; b=XL6VxjuD3+qVupXu1EN2Wh8bPQ XzOFa7ISNj6B7w0KLxNbO2SRBakf0A6zLYgn3dxqcHZyJm7o51p+uvUT6bUbdySc uTi4Nl1pODVgESFVU3JoMVjWd5aR2AgLNfuicx5U+81vqrAmKxUnnS360Nuh7cBB TnsOOj0yXJbZBxq1pd5q2X4EaCy8pXP52OeJYQ0YxykIL+GRyMvjXgQ8fd6ixZup qJMF3pLl8wDoWBiXivFe3rcyhJf8TshOb5VEHo6tW7wbv4P/teuUWnF4ODbbxPGA sUIoDgbsPrN9xh0Zo25l66FW05bTNIwML8HHdkRvZh1KKb4wGiLA8MrN0TRQ== 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= 1741129914; x=1741216314; bh=ycIWfTCAE81YU13ulZ1oGMari2euAvaSYxd 3yWAS1tU=; b=S3Za1QW+uKDa6ce+Tngshyp0JRcIWwRiLBsM6GNtSLE+bTDm/f1 3p5Q7n8uh7Fc0RLU3u6jGLiKzvnGZQDXYgI7IzgF6tVZxrjYUwTGGHrcFRHjm8kU vPTrkeKcKhEn9m1DM3XjY2kG3OUZPQyyEmI2Trqf6yas3mm0uHMOBQhoDkNWPwog LPx5a86lfqkcwKqXhOdEdF02iaxHw6oNgE6WRO557KAt82aSFAVqE5gYFVpgVWTi /i7FP+ryxa3+QPUO/lB6v9V+p9Qqr+kxVih1B+GH77ca/+WkJsUOkPNHHf5ONt4Z Kh4njP/sCIklNtOdBiPO+mBx7BAVUtAeBAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddutdefvdehucetufdoteggodetrf 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; Tue, 4 Mar 2025 18:11:52 -0500 (EST) Date: Wed, 5 Mar 2025 08:11:36 +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="+HzmqUPArNb1MgVA" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+HzmqUPArNb1MgVA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 04, 2025 at 10:31:46AM +0100, Anthonin Bonnefoy wrote: > Saving the printQueryOpt when a command is pushed was an option I had > in mind if that was straightforward to implement. However, even with > savePsetInfo, you will need to save values like gfname and gset_prefix > since it impacts the output (it may make sense to move those in > printQueryOpt). This would also need to be saved for all commands, > like \close or \parse since we don't distinguish if a piped command > generates an output or not. So that definitely looks like it would add > a lot of complexity for limited benefit. Yeah, same opinion here. I don't want this level of complexity with extra manipulations of printQueryOpt when fetching the results, either. I'm all for making these meta-commands to what we think is more natural, but not at the cost of a more complex logic in the result printing depending on what's been given by a meta-command when a query is pushed to a pipeline. > I took a stab at creating the \sendpipeline meta-command. I've also > realised there's a small leak where fname is currently not freed on > queries like 'select ... \bind \gx filename' when within a pipeline, > which is fixed in patch 0001. Indeed. Fixed this one for now. -- Michael --+HzmqUPArNb1MgVA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmfHiKgACgkQnvQgOdby QH1+7Q//S9p5DotWO6NGfdaaIq3skai+dLMy/m+wF85Xrt1yC0+r/GDmx9AYDwYD fZks3dCp7IpMYBTptW0bv3VWLzVSv6JW7lJ96pmHajL5LmRobhH5sQ5JFgYfnNji nYk99mACD41Tuzzr3kRarve7eoCf8mh+YkKhSVFXZj2pCXD0C1Z6IrGc555ZFMhC I3NUgRkO999o9rZTU+fyV3dyjZtukRk5sS0svJDebPdstyJFr3MNxkmn2B1S8R7U JO3ai1RH0Gt6Z4PfWaUuLs9VpVKJRPH6D3Z501zSmL4JFB6s8tAKhGAiDObevffI av5phr+SRzQrFi2D/nrvpambJE5qVeb7YB4/c9B+4I4Vje88fMviR2c6u+qjY+Ze xLTOfSuRzIYm8NIn8DHKYbQofxbkW5ECvxBhb/jS/pYOtwar1IKwaqsjf7rg39St 6MH0kPBEBuEHh20PzrAhst3jm5a9/LfQZSEZXJwuBwwKpl87MLB0NwqdhdaCcRE6 5uGBO0Nqv9GNI0wWNZRK2qXaR/jKRfujXK182b0VedmeiKo4kozLAwf/GZ1RVggA EhTNivrdtMn+CuuMJtOxsODgiKTk5gwqgjCJ4nGspv6KAYuyfCbLAGehY6sAVfwL /UXngWOHSiMbpSOjJewUlg2xBpTY3LpqfX5xfsxNVAUsFSMvQTg= =aLos -----END PGP SIGNATURE----- --+HzmqUPArNb1MgVA--