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 1jr2S7-0000cq-2i for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 16:52:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jr2S6-0006v8-1I for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 16:52:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr2S5-0006v1-Pj for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 16:52:45 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jr2S3-0000EJ-Gp for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 16:52:44 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id EE820D37; Thu, 2 Jul 2020 12:52:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Jul 2020 12:52:42 -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=3 OhDUCR0+lwkJR8H3Ce7nrAbnKtOumjr9W4+dyh/p9Q=; b=PD0DShr+v1UP6yo7s ff/+Kh0YvqZoe1rdtn0FnPHY7xBMRsFIK0/AQIi87Ox0S5J/7LiWYE7jGKvY1p85 WMZowLgTZTmt1pj07Afptabwi5PpP7TxdP/e8IPRbh6lWoQ7TKbi9LwFS0FqpKDJ cdSsbxQWklO7QcCn5bpHrbQFJYfackd1rN0JVUfEsdzN3MqW+TFm4lYuk4NcVea2 z0WXLilmsR9xD2Kecr98J31SVX8cHAxRwMxymwkb9orXf04G/hNVNxY2u8tdINiF Mi6N8PoGv2ZSTJkaxfRjDe0QtaXo6ivpTmgESD5QtDoyP8INfEBg9yHxnBKW4jmH n2BEw== 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=3OhDUCR0+lwkJR8H3Ce7nrAbnKtOumjr9W4+dyh/p 9Q=; b=roYQehycUpKW36pxy+HJ+aTD6SBcC8FUDYlz9gdTVbqJ0+bmInM5Q7iV1 yy5zafsHstvqSkCzqpEwKPfotRQ4u0UO2Ts7H3u0IYRdno72dW4b8MwmMo7wPwHr 5JLNJsphK/3sajZAaZv9SlDraWpbkXjshQmlKN2c4em4+y6BUdK+xmC0JdQdLnL+ L+nM5VjWcDk2qJyB5+Fvy9Jx41lY1J2R0XtmaIYpbnwLnUB55UcgD4egNV8gSqum UWizbRcgCBsBeqUBtva4jde1qRR94Abs10S2hYCeRR61MCBN5nsuo3ocxCyvmyo/ HYBfTJgKKneIz+WqxIEtdfDvvl+yQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdeggddutddtucetufdoteggodetrfdotf 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 C75303280064; Thu, 2 Jul 2020 12:52:40 -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: <9dca306f-e60c-1bd6-b639-23d9a8f9b4a3@aklaver.com> Date: Thu, 2 Jul 2020 09:52:40 -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. But psql can. psql knows what the setting is and act accordingly e.g.: test(5432)=# \x Expanded display is on. My suggestion is that the hint would only be shown in psql. Using HINT: maybe not be the best choice as it shows up in server messages, but something along that line. > > 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. > > -Jeremy > > -- > Jeremy Schneider > Database Engineer > Amazon Web Services > -- Adrian Klaver adrian.klaver@aklaver.com