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 1jrPlQ-0005jK-8b for pgsql-general@arkaria.postgresql.org; Fri, 03 Jul 2020 17:46:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jrPlP-000299-2h for pgsql-general@arkaria.postgresql.org; Fri, 03 Jul 2020 17:46:15 +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 1jrPlO-000291-P5 for pgsql-general@lists.postgresql.org; Fri, 03 Jul 2020 17:46:14 +0000 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jrPlM-0004uw-Ij for pgsql-general@lists.postgresql.org; Fri, 03 Jul 2020 17:46:13 +0000 Received: by mail-oi1-x244.google.com with SMTP id x83so19536138oif.10 for ; Fri, 03 Jul 2020 10:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=JFfkmv/t9B83Gc/F2L7m9xhZQEOQW0DOOJuS9HYTdz8=; b=NKG8xiBWdA7tMu32UDB+DWXUZ6CyBBjFDO+39R0Tg1yYYVNjH+IAaqT3zE/YdivjX7 4Y244eckFDEncff81H+z8at9anboQHeYQlSPg98rgu+yjaxnCRwZsQ+k1VKrEzUuu4zN JL7NReOT7TYSo2ENYc5fWRsw1vV1/7/kgVoKbvrgbJ9/G4AxWTZWW/m1ROUlXxan1tLO 9S2TvYxP6MC7b4DbSsTx+9A34OEZQiED1JyucVIDXH90/3v4+FvIoCcIrnc1bDOei/R6 wFSvYXZLiNCXH1R9up4MfZAnmPqXAzNAZp54equNkqdRKQ1d6ZJSSpTfkxcd7q91Djy5 Vdyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=JFfkmv/t9B83Gc/F2L7m9xhZQEOQW0DOOJuS9HYTdz8=; b=E1Vp1i5VMgf/0Ua+Uz5gKU5wFdaaa68Mq+1DlikA3eGuvNDX/Jdu3YxJWs/0ilUMn9 68dWYHrChO+b25WzaWyQ64xyL7ittGanEnhVmJMVKH+izyatB4Fp0H50H4cHEWjajS6p 0ED1pDrHFVUTFVPMZ9SDF0lyAsYBrdiZYLfiX276tWyxaTpa2gy32vZx0D33/AF/NwtF y9LfKzlze8AqxusZou2Cnt5Ouu4Y9uU3bL+6rULrMJsh9emYfeda4Rxq9HPQ8gaHlCNV 1m2VJSg3czPP+v6TyxlRRH49y9h+5Iuo/nMBMOqanqNGKeysAf6NLRn6l7D0bjrOi21D TnkA== X-Gm-Message-State: AOAM531psApn8S/o74A0vwDK698YoCOjMH6RiJ4wBRpQoJFj1H9uKGMP 7glmlpxb2USHL4AP7+CWs+kYQX6QFA7wMQ== X-Google-Smtp-Source: ABdhPJw9+SG/nvd+4yVQ87jURQ3XXuoRTnXSBKKYyV+7KHlkMJINHVuYenXXDuzj/dSzfBKEwlE1/w== X-Received: by 2002:aca:6c6:: with SMTP id 189mr14694462oig.134.1593798371501; Fri, 03 Jul 2020 10:46:11 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id k2sm3413018otn.56.2020.07.03.10.46.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 10:46:10 -0700 (PDT) Subject: Re: survey: psql syntax errors abort my transactions To: pgsql-general@lists.postgresql.org References: <658a910b8a785a859f651102798ead5c851d8034.camel@cybertec.at> From: Ron Message-ID: Date: Fri, 3 Jul 2020 12:46:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <658a910b8a785a859f651102798ead5c851d8034.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/3/20 1:54 AM, Laurenz Albe wrote: > 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; How so, since it does not carry over indexes, foreign keys, triggers, partition references, etc? -- Angular momentum makes the world go 'round.