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 1l9bJ0-0001NN-HZ for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 22:16:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l9bIz-00087H-FU for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 22:16:21 +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 1l9bIz-00087A-7j for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 22:16:21 +0000 Received: from ook.raf.org ([139.99.156.21]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l9bIu-0003sL-8H for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 22:16:19 +0000 Received: from localhost (localhost [127.0.0.1]) by ook.raf.org (Postfix) with ESMTP id F26B95DE46 for ; Wed, 10 Feb 2021 09:16:11 +1100 (AEDT) X-Virus-Scanned: Debian amavisd-new at ook.raf.org Received: from ook.raf.org ([127.0.0.1]) by localhost (ook.raf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9bpTnsA50tjJ for ; Wed, 10 Feb 2021 09:16:10 +1100 (AEDT) Received: by ook.raf.org (Postfix, from userid 1001) id E17985DE75; Wed, 10 Feb 2021 09:16:10 +1100 (AEDT) Date: Wed, 10 Feb 2021 09:16:10 +1100 From: raf To: pgsql-general@lists.postgresql.org Subject: Re: psql behavior change on upgrade from version 12.x to 13.1 Message-ID: <20210209221610.lanfe4ruycsui7he@raf.org> References: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com> <882289.1612899802@sss.pgh.pa.us> <3308FF9B-C01C-476B-8CE9-0F2C9ACCC542@yugabyte.com> <883658.1612901512@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Feb 09, 2021 at 12:19:21PM -0800, Bryn Llewellyn wrote: > > > On 09-Feb-2021, at 12:11, Tom Lane wrote: > > Bryn Llewellyn writes: > > Here’s what I get when I do "otool -L /usr/local/bin/psql"; > > > /usr/local/bin/psql: > > /usr/local/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.13.0) > > /usr/local/opt/readline/lib/libreadline.8.dylib (compatibility version 8.0.0, current version 8.0.0) > > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0) > > Right, so that's using a version of libreadline that's supplied by > Homebrew (the /usr/local/opt path is the giveaway on that). > > I don't know whether these things represent an intentional change > of libreadline's behavior in Homebrew's build, or a bug, but in > either case you should take the issue to the Homebrew support forums. > If it's intentional, I imagine there's a way to get the old behavior > back. > > Also, libreadline is fairly configurable, so maybe this boils down > to some unintentional change in your ~/.inputrc ? > > regards, tom lane > > ————— > > Thank you very much, Tom. It seems, then, that we have the > “microscopic” explanation. I’ll have to to a fair bit of research to > find out what to do to fix this problem. This sounds exactly like changes that happened in debian a while ago. I was taken by surprise as well, but it's actually much better behaviour than previous behaviour. It's nice to know tht you have to confirm the execution of a pasted shell command (especially when pasting commands as root). It feels safer. You might come to like it. But of course, the readline library is probably configurable enough to change the behaviour. According to https://tiswww.case.edu/php/chet/readline/rluserman.html, this could be what you're looking for: enable-bracketed-paste When set to `On', Readline will configure the terminal in a way that will enable it to insert each paste into the editing buffer as a single string of characters, instead of treating each character as if it had been read from the keyboard. This can prevent pasted characters from being interpreted as editing commands. The default is `On'. So try putting this in your ~/.inputrc file: set enable-bracketed-paste off cheers, raf