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 1o1ME9-0005HV-S3 for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2022 06:10:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o1ME8-00086a-Od for pgsql-bugs@arkaria.postgresql.org; Wed, 15 Jun 2022 06:10:04 +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 1o1ME8-00086Q-GP for pgsql-bugs@lists.postgresql.org; Wed, 15 Jun 2022 06:10:04 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1ME5-00076c-V4 for pgsql-bugs@lists.postgresql.org; Wed, 15 Jun 2022 06:10:04 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E09F03200922; Wed, 15 Jun 2022 02:09:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 15 Jun 2022 02:09:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1655273397; x=1655359797; bh=v8BkB/mOdz Z167z0uF3xUCjmzHFC6DsijA/fz1kyblA=; b=f70WU2Ky7TWWBKv6XjkOXHcStG SYUPf8/M2lvnMWJbuMGxO8zgS2SNo7PfJYSsYQWIhzd4xaepEC4cGPYL1jpEoB6Q txZMbA2uYHvaMegj/qQPifjgWQvRpmqYFoJ0DGciJ1mWPK98Zs7D/KrLafEpOLUj XkpNc8fqk0+h6ngwJMntaC6xCoxUFCDRRwlDZ3cG12u6v+i3jQdi3Rn9EwFtR4/J L/TvEPdAr3HC6pnP6AOASc3IVDadsoQD2wBbCG2l6fvOxqXqSKWB6+n5v97mPJ0J YOxPLgybrg+VdxLkCOtev/yHi7nHS028EOTdUwx/Tl5FI0F4+YPq7rTtr7cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1655273397; x=1655359797; bh=v8BkB/mOdzZ167z0uF3xUCjmzHFC 6DsijA/fz1kyblA=; b=vD1YDWmH4LadXTFk3oe/J7tPu01Xqd45/rWYgQeHNxsw tLFGwD6TBzY/R/dS/rRlTGQnbXu4Hbq49IWZj9uuP0CYQ0+GGzja5iwbZ1rJzRGG 7C6kVXfg9n9WjN87eZ+YorrxVLd8Gyp8xOcSbDlfM0N2IlXEiywCHz4YTYvtgHkd qQvo+QsRv9Mr1YoS5CMhb7SI42uGliZ4S6hQpkYEDXvo34lTtY8p8ru8qqb26yXd vw8PgTMNL8NJFilJbZwr3vevsS1LEOIyn7189SC4/u5JWQTN9iRckjkIMDKScF8Q P0NgvTIGM0JOjgcYRGqEdXqIIhkPLoK0RjGpMSugyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvtddgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Jun 2022 02:09:55 -0400 (EDT) Date: Wed, 15 Jun 2022 15:09:53 +0900 From: Michael Paquier To: Tom Lane Cc: Kyotaro Horiguchi , robertmhaas@gmail.com, christoph.berg@credativ.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17504: psql --single-transaction -vON_ERROR_STOP=1 still commits after client-side error Message-ID: References: <2649417.1654875709@sss.pgh.pa.us> <2656555.1654877531@sss.pgh.pa.us> <20220613.160701.975499861789120736.horikyota.ntt@gmail.com> <3791929.1655131936@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uVHJWkV5Toqajk+I" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --uVHJWkV5Toqajk+I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 14, 2022 at 10:31:21AM +0900, Michael Paquier wrote: > Okay, let's do so then on HEAD. I'll wait a bit more, in case others > have an opinion to offer on the matter. Well, done. One thing that I find a bit surprising in all that is the=20 lack of consistency in the handling of the return code of psql when the last switch fails when not using ON_ERROR_STOP. For example, psql fails if the last switch is a slash command from -c, but succeeds if the last switch is a slash command in a file from -f that exists. This comes down to the way failures are passed down from MainLoop() so I am not sure if this is worth worrying about and nobody has complained about that AFAIK, but I have added some extra tests to at least document everything I could think about to track changes, in case somebody plays with this code in the future. -- Michael --uVHJWkV5Toqajk+I Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmKpd7EACgkQnvQgOdby QH3oRg/9Gq4jUHTdixu8Cjx0on3T5DVOIgdmZYFPLJSEPwPvgq1Q+miE82nOIkH+ Z0yzNoepItTPbPAiJR7mlG9TaXoel09I03gnc6yOgCLiidzF09B0auwmgDkAsrGx YyaN1kiXS+FlvsKHVn1E/0E9gjjOhdebZhOiJSBi6moPBCGFGNnc/whd0+69pU6p qn2S1Fv9CSJFdYbufJQ6u9ZrN4dKhsEZEZRuL+fY0SKz3y35mmyMAS1Zu132QLJd mNRNkWullOHK3ct7z4hvQEkU38zCv3Z3AaBHPmqutT/zGtsqQOVT3xZvRZJlBI8S Hr05r574cGkllQ4bh1znmX7lpxYNBxlqobh4IjEQqLrb0uy3oNop6MiVbxgcxtXj NJzlpmqFN5VeMmvxQTFTsvux8vJAF1YXrbSnCCY24IgUMoPIvY7g2sWAdadagYb5 L56EQwlLpmMEnfdHDnwQ3jRoQr54lXH5SLfPS1ORvRXbxWwif1m8JsEfNQmL1hUt D3Q8XRGWfN973vdQEEutOD/AXBA/TAgFF3PDrtqU5+yfgFdEIWltGn2/xiZ2ya9V 6siziRWcumLYcZ86S5bjeKyMFnZ8UqebtLRtUhcA+tnPnV1QxCZWkYmMNFbCUwm/ qufm3ukcqm3N89oCKwEyCeUa0LCC2KtkBBqR7nciT7NXEWJGI0c= =1OdX -----END PGP SIGNATURE----- --uVHJWkV5Toqajk+I--