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 1l9Z8l-0003vu-40 for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 19:57:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l9Z8j-0006up-TJ for pgsql-general@arkaria.postgresql.org; Tue, 09 Feb 2021 19:57:37 +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 1l9Z8j-0006ui-Ja for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 19:57:37 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l9Z8c-0002gU-No for pgsql-general@lists.postgresql.org; Tue, 09 Feb 2021 19:57:36 +0000 Received: by mail-pf1-x435.google.com with SMTP id j12so12555501pfj.12 for ; Tue, 09 Feb 2021 11:57:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yugabyte.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/Qkg81FjsIw7dMDn3b9TdGjrRFaWW2xMBIh0qZx1er4=; b=Xee6spcXMYyTuTxJ0FsZxi0XyIMfr34jqA5zsiLgIX5C0gffTw79AE7eQI1ULQoAoz j8GWVhTpjNK2YTD3lHQkPT+FjiLnN2I3jBTBhKe84u33a3HI5h8IdKuwwcWBo9lQb2pZ ACbyazzZ5KmfKaE3uCvFYuOCnflwRHXdBohSs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/Qkg81FjsIw7dMDn3b9TdGjrRFaWW2xMBIh0qZx1er4=; b=K9REM1Dfa3ilhPg3l7XeF/TJRmL0Ez+eVzvVZy2H6XeoOroeimHpa7UZsiyK0d7+Lp Luan1QQfpg+S8fDN7vAOGpxLZzlpMRuEr/I33zneoK1Rfb+UlJGYI9C1XZf6ILYLHz9f apW1/VOmD09YyfyIA1yPBnQ4RZxjRSXkOsTp0DuGJLDRIG+fyzWP3KM+sPtdt9t8G2ZD Okfaknz2dT07N5qWzS+Ne7p7QSjUuOjBkOLxrjRJoDyeQeo9nUMjA3PTSRw9qY7tHQt9 lqkMqOPQ4GFWRNF63C/2fyjjhG4Q6PqgL89ydIRJoR2k4nqhuUojnL5dH/pkMFsHU5iH XyGQ== X-Gm-Message-State: AOAM533mQUQ/2h6X9IVC2MuXf6Kbns7tC0dFPGWyQ58FeSEK1vamhW2g MSxvETPn/B6PLJb8NPous/DFTQ== X-Google-Smtp-Source: ABdhPJyl8z2OIEtwy+rZXHp9fTW0afB8w2vmMDA81ScNJ1etHn5A8psc58LDe/Gt0NbbKJo5QFvc+Q== X-Received: by 2002:a63:ea4b:: with SMTP id l11mr23119206pgk.61.1612900648071; Tue, 09 Feb 2021 11:57:28 -0800 (PST) Received: from ?IPv6:2601:646:101:7fda:949c:b39:cf2f:35ef? ([2601:646:101:7fda:949c:b39:cf2f:35ef]) by smtp.gmail.com with ESMTPSA id j4sm22343281pfa.131.2021.02.09.11.57.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2021 11:57:27 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: psql behavior change on upgrade from version 12.x to 13.1 From: Bryn Llewellyn In-Reply-To: <882289.1612899802@sss.pgh.pa.us> Date: Tue, 9 Feb 2021 11:57:26 -0800 Cc: pgsql-general list Content-Transfer-Encoding: quoted-printable Message-Id: <3308FF9B-C01C-476B-8CE9-0F2C9ACCC542@yugabyte.com> References: <7CCA6956-D22C-4E4F-B7B4-A450A062BF59@yugabyte.com> <882289.1612899802@sss.pgh.pa.us> To: Tom Lane PostgreSQL X-Mailer: Apple Mail (2.3654.60.0.2.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 09-Feb-2021, at 11:43, Tom Lane wrote: 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 = 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 "" 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 =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 Here=E2=80=99s 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 =E2=80=9Cbuilding" 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.=