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 1l9Yvb-0003We-1m for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 19:44:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l9Yv3-0001KZ-Og for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 19:43:29 +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 1l9Yv3-0001KO-HG for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 19:43:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l9Yuy-0000T7-GF for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 19:43:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 119JhMv7882290; Tue, 9 Feb 2021 14:43:22 -0500 From: Tom Lane To: Bryn Llewellyn cc: pgsql-general list Subject: Re: psql behavior change on upgrade from version 12.x to 13.1 In-reply-to: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com> References: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com> Comments: In-reply-to Bryn Llewellyn message dated "Tue, 09 Feb 2021 10:55:31 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <882288.1612899802.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 09 Feb 2021 14:43:22 -0500 Message-ID: <882289.1612899802@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bryn Llewellyn writes: > HAS ANYBODY ELSE SEEN WHAT I REPORT BELOW? > First observation > Now, when I copy a single line SQL command, terminated with semicolon an= d newline from the Text Edit app (with Command-C or the menu item) and the= n paste it into psql (with Command-V or the menu item), the newline isn't = respected. I have to hit the return key by hand to see the effect. Moreove= r, the pasted line has a highlighted background. > Second observation > When I copy _several_ lines of SQL commands from the Text Edit app and t= hen paste them into psql, none of the newlines are respected. (I still get= the strange highlight.) Now when I hit the return key, I get errors like = this: > \i: extra argument "" ignored FWIW, I'm not seeing that here, with Big Sur 11.2 and up-to-date Postgres. In a typical Postgres build, most of psql's input behavior is not determined by psql itself, but by libreadline (or possibly libedit, if PG was configured to use that instead). I speculate that your build switched to a newer version of readline or libedit, and it's behaving differently than you're used to. You could get some info about this by applying "otool -L" to the psql executable. On my laptop I see $ otool -L /Users/tgl/testversion/bin/psql /Users/tgl/testversion/bin/psql: /Users/tgl/testversion/lib/libpq.5.dylib (compatibility version 5.= 0.0, current version 5.14.0) /usr/lib/libedit.3.dylib (compatibility version 2.0.0, current ver= sion 3.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current v= ersion 1292.60.1) of which the relevant bit for this purpose is "/usr/lib/libedit.3.dylib", pointing to the Apple-supplied version of libedit. Maybe you see something else? regards, tom lane