From: Bryn Llewellyn <bryn@yugabyte.com>
To: Tom Lane PostgreSQL <tgl@sss.pgh.pa.us>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: psql behavior change on upgrade from version 12.x to 13.1
Date: Tue, 9 Feb 2021 11:57:26 -0800
Message-ID: <3308FF9B-C01C-476B-8CE9-0F2C9ACCC542@yugabyte.com> (raw)
In-Reply-To: <882289.1612899802@sss.pgh.pa.us>
References: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com>
<882289.1612899802@sss.pgh.pa.us>
On 09-Feb-2021, at 11:43, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Bryn Llewellyn <bryn@yugabyte.com> writes:
> HAS ANYBODY ELSE SEEN WHAT I REPORT BELOW?
> First observation
> Now, when I copy a single line SQL command, terminated with semicolon and newline from the Text Edit app (with Command-C or the menu item) and then 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. Moreover, the pasted line has a highlighted background.
> Second observation
> When I copy _several_ lines of SQL commands from the Text Edit app and then 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 "<the text of the line>" 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 version 3.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 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
—————
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)
In other words, different from what you see. I'm an ordinary end user. I don't even think expllictly about “building" anything in the PostgreSQL system. I got into this mess (as I believe) because I did this:
brew update
brew upgrade
A colleague advised me to do this periodically as a hygiene measure. It had the surprising, and for me undesired, side-effect of upgrading my PostgreSQL installation from 12 to Version 13.1. I suppose that this triggered a build of some kind.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bryn@yugabyte.com, tgl@sss.pgh.pa.us
Subject: Re: psql behavior change on upgrade from version 12.x to 13.1
In-Reply-To: <3308FF9B-C01C-476B-8CE9-0F2C9ACCC542@yugabyte.com>
References: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com> <882289.1612899802@sss.pgh.pa.us> <3308FF9B-C01C-476B-8CE9-0F2C9ACCC542@yugabyte.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox