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 1jrFae-0001VY-BW for pgsql-general@arkaria.postgresql.org; Fri, 03 Jul 2020 06:54:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jrFad-0005Ou-9i for pgsql-general@arkaria.postgresql.org; Fri, 03 Jul 2020 06:54:27 +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 1jrFad-0005Oj-1z for pgsql-general@lists.postgresql.org; Fri, 03 Jul 2020 06:54:27 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jrFab-0003GB-1C for pgsql-general@lists.postgresql.org; Fri, 03 Jul 2020 06:54:26 +0000 Received: by mail-ed1-x52c.google.com with SMTP id d16so20089952edz.12 for ; Thu, 02 Jul 2020 23:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=sR6awhEn/8QQkk5aP6aY8Xum2g5B80fUXE4Sukngya8=; b=imHnEi3VXSvKwau+04NMYRO5q2SpN2bWBoQkrlrb5JCaVvaGBIi3XBPOTphRwIk7Go qKVWTzVEi1/y9y4b/vbMz6dhkPhWgYIuEy+1MriHL5O5AqOzNkgpQxLEiuNHP3qKgO9j +11JHA/Lt9umrcX1XEQ10VpUs6r/g9Z9WRwBpFykXcZ4kxf9WZ1a8dwUd5nuPIytD4oc YTUNwitZRiXmC4GC3oL7H53t5BOGW0C7UAXAb/ZaFWfKt2FpXmZbr1fSTx389NWrOLDB 0a59eiex97g8VPQaemPfntFu6vz4P8fCX2FKcXEIBa+i5tl0U/xAg/eTHlDzwbZhZfeG +xzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=sR6awhEn/8QQkk5aP6aY8Xum2g5B80fUXE4Sukngya8=; b=IHSh6/rRxj4WatTBnHolJ0gH2/plZt/UISGhFNUY1aTdfRd5ep6HRiQ4dSPbx1rP3T V86GtjebJkk9IJSxxmFBc7ayM0hzMTcGrPm8N971kUlnDSqz5KS9UwexYft0bWdBxPqS 4vDWT3Pvem0n2Ul0VifvRiZKZGTD++DjLmzhGrrxHbY/WebGqc0mxcdXM1h1+uaDsNfF e/SyOtmzzGhaXP6gdpTPqn0agiq9vNb8Z/Ae3fwAjvmAXXR708v7Cny4eCjaN9JM7re3 4LxvlVNePtwvv4y3B6c2Jt8ZmQGm06zZw7jYAZYMVbJB9fbU7649G/U17jeTIP/wGhWI Eemg== X-Gm-Message-State: AOAM53040+RNrehxCWDbwpdMJFKwXo0M6gQ8BmllMpFgav69Va836dLa +oF33UtdDIQKAc5v0uxDu5BqGQ== X-Google-Smtp-Source: ABdhPJxYqfm6/5Qy92CCPXJqnPrMpptwgDjpw6CuqFE4r5xOLcuFORrFMZjlEu6HnCKWtzBvLenZOw== X-Received: by 2002:a50:e8c8:: with SMTP id l8mr39821829edn.386.1593759263987; Thu, 02 Jul 2020 23:54:23 -0700 (PDT) Received: from localhost.localdomain (217-149-169-94.nat.highway.telekom.at. [217.149.169.94]) by smtp.gmail.com with ESMTPSA id dh16sm12422022edb.3.2020.07.02.23.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 23:54:23 -0700 (PDT) Message-ID: <658a910b8a785a859f651102798ead5c851d8034.camel@cybertec.at> Subject: Re: survey: psql syntax errors abort my transactions From: Laurenz Albe To: Jeremy Schneider , "pgsql-general@lists.postgresql.org" Date: Fri, 03 Jul 2020 08:54:22 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 2020-07-02 at 08:54 -0700, Jeremy Schneider wrote: > Maybe it's just me, but I'm wondering if it's worth changing the default behavior > of psql so it doesn't abort transactions in interactive mode when I mistakenly > mis-spell "select" or something silly like that. > This is of course easily remedied in my psqlrc file by adding "\set ON_ERROR_ROLLBACK interactive". > [...] > But I do know that for all the new people coming to PostgreSQL right now > (including lots at my company), none of them are going to know about this setting > and personally I think the default is user-unfriendly. > [...] > > So... > > Survey for the user community here on the pgsql-general list: it would be great if lots > of people could chime in by answering two questions about your very own production environment: > > question 1) are you worried about scripts in your production environment where damage > could be caused by a different default in a future new major version of postgresql? > not aborting transactions in interactive mode when syntax errors occur) I would dislike if interactive mode behaves differently from a non-interactive mode. This is my favorite example why I like the way PostgreSQL does things: /* poor man's VACUUM (FULL) */ BEGIN; CREATTE TABLE t2 AS SELECT * FROM t1; DROP TABLE t1; ALTER TABLE t2 RENAME TO t1; COMMIT; > question 2) do you think the increased user-friendliness of changing this default > behavior would be worthwhile for specific users in your organization who use postgresql? > (including both yourself and others you know of) I personally would benefit because I wouldn't have to repeat the whole transaction while teaching a class when I made a typo inside a transaction. Still I prefer the way things are currently. Teaching classes is not the main use case of psql. Yours, Laurenz Albe