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 1jr2W0-0000jE-HH for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 16:56:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jr2Vz-00026D-BP for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 16:56:47 +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 1jr2Vz-000266-2d for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 16:56:47 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr2Vr-0003wX-Am for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 16:56:46 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A3486E0D; Thu, 2 Jul 2020 12:56:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Jul 2020 12:56:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=L YK0yRmZhDlsi7jEsJuZtsdPpVCHFfLMkqJw5L4L29A=; b=t/thWlF3Me1ECEqhv oiiKFDdVjTV+MjpExp4ldM/p+vnZ8yRgxCz/MO7edr9OHT1TREuqO3eFFmllkQNL mumeXWApO62X1MB1pkXe69eVTHXBUzWpdwc3msTu9VgvtBQpXzqfw4x3bJlnqwQc dEv1p+D+yEe1VS+mZJhzs2WFuWYNNtWGSPfRzfK+CGgZnXdRKh+sADO0SuMyctIS ncVq8X7G5dfXiHRYr/hOEozliaRuPZewVIvuE3l9T+7xJTee+ZlkK2Q0EhJUkTkq 9SV2oM/MZTfRZu/W3cV02dg9pGQ244f9Y7QToDLaLJehRm/NTG95yn48zJHZwCaR 1c5gw== 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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=LYK0yRmZhDlsi7jEsJuZtsdPpVCHFfLMkqJw5L4L2 9A=; b=e8a30b1jviGDCkJm9lzJQo5TlrmG/IF23joV7POx9L8u4eN4Dl+w+eOIc WxKVpAEQFB7IcQeDjCPHQqkO41lWREPHET0BxgCUKjJyIKPmiCKFxvd3kl0Nme36 sRXaGYJlsLX1ldnktDMPiW64WswjsjNFAJ8q3J6mtpS5ON4Ydgj56cmgngSVlpMH Z/hjHjOPpBt35btsutHm3CWx/PAz9fJIkuQA64WLsyvaZKjVLBEtK664HIWwAvwd 0/DQL5ohjh1YEm3HIGpSyKztKfoGFQjs3mIfIyOpnai0y6kEyiMvaArqnZtBYvxE YuOqVz/VgA8SltZyAqMj12tHb47hg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdeggddutdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepjeehrddujedvrdehrddvfedunecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgr vhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 90A92328005D; Thu, 2 Jul 2020 12:56:34 -0400 (EDT) Subject: Re: survey: psql syntax errors abort my transactions To: Jeremy Schneider , "David G. Johnston" Cc: "pgsql-general@lists.postgresql.org" References: <58f63b75-f11e-ce5b-3ec5-7d4acfbb87d6@amazon.com> From: Adrian Klaver Message-ID: Date: Thu, 2 Jul 2020 09:56:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <58f63b75-f11e-ce5b-3ec5-7d4acfbb87d6@amazon.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/2/20 9:44 AM, Jeremy Schneider wrote: > On 7/2/20 09:28, David G. Johnston wrote: >> The status quo prevailed since no-one chose to contribute further >> arguments for change and the original patch was retracted.  What kind >> of "bike-shedding" (which seems to be used incorrectly here) would you >> expect? > > The bike-shedding comment reflects my sense of humor, which is evidently > so dry that it can be entirely un-detectable.  :)  But overall I do > think there's room for input from more people.  Might not change the > outcome, I'm just curious if there are more people who'd have thoughts > to offer. > > I'm not sure hint text would be the right course, as the hint wouldn't > make sense in the context of other clients and I don't know if we have a > mechanism now for the server to change it's error response based on > which client is being used. > > One other thought occurred to me after sending this email - does > ON_ERROR_ROLLBACK=interactive differentiate between syntax errors and > other errors? Thinking about how users approach SQL, this feels > significant. I'd happily want to let users at my company retry after > syntax errors, but I'd want them to inspect any other error more closely. An error is an error: \set ON_ERROR_ROLLBACK interactive test(5432)=# begin ; BEGIN test(5432)=# slect 1; ERROR: syntax error at or near "slect" LINE 1: slect 1; ^ test(5432)=# select 1; ?column? ---------- 1 (1 row) test(5432)=# select 1/0; ERROR: division by zero test(5432)=# select 1; ?column? ---------- 1 (1 row) > > -Jeremy > > -- > Jeremy Schneider > Database Engineer > Amazon Web Services > -- Adrian Klaver adrian.klaver@aklaver.com