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 1nlejg-0008Kg-T8 for pgsql-general@arkaria.postgresql.org; Mon, 02 May 2022 22:41:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlejf-0000S8-Oi for pgsql-general@arkaria.postgresql.org; Mon, 02 May 2022 22:41:43 +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 1nlejf-0000Rz-9z for pgsql-general@lists.postgresql.org; Mon, 02 May 2022 22:41:43 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nlejc-0002qM-SA for pgsql-general@lists.postgresql.org; Mon, 02 May 2022 22:41:42 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id a5so11196928qvx.1 for ; Mon, 02 May 2022 15:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to; bh=EhxkH0xv29BGbk9NZHT32r3V5eKA/jLYcaSa+LIo4nw=; b=jtiIYVDcgCq6ajQxg1VNb0ciElgmJwSC6TW1m81YfRKzLzpR7xhobLFPt60GGS3gYx I6VLYfip8vMI4qWWLye79D4bvyYNcX00wIpl0HQN/v7NoHYQr68omkF4iofAUKWN6QO2 fANOfA3tFEJ31Rtv8SO4PP21Nnmv/tRUwxROE9YurxkFSD5aKceTKZRg9UTEy8jf1vUp 91ceH9a/tLcGFdLbwDumgstz5ksGcwp5QoQZLuJiitStGSsBL1lytrCi0YTs99Au/qT5 /pq2gJHvYYEUdZnT0j8mMoSy18eIa4SN6DifF93xdSj7CojbtZF2at+sZjQ0cnBkTKzW SahA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to; bh=EhxkH0xv29BGbk9NZHT32r3V5eKA/jLYcaSa+LIo4nw=; b=Fp8jE3eVFBtQHH7quWs/b6V/RUmorFsJXJs+aCk8m9BH2YiZl+50uNEGyGbCqZdsFz LxBaHoIZLJAIt/pfrcEy88UqyS559bEm1AscT0yxvqWFIGmYRNfIvx5VpK/iNPUbnUSj 0KT2PsY1PizwwuKkoTfI6RCtd3PJfrVpqT0yaYFd0bAzmfkRJ68PeaTt7OaG0kCIM1f7 188O01DW9I0IvTPJxCuKHzSuiDN//OSY0rBW+YYKCx/gHdgAIsp3tHB0FzuyRZHzzChf kUokAGj8YxDr6LedqwXnaRp0wcIjJhH1rREl74SPvbSt34adzVyFG3KtCU6PCoTSZvEt nk9Q== X-Gm-Message-State: AOAM533EaStg0ZyNNoYamo/uzJeP3eefIPKMX4BjOi3aVTml4nFWJFi3 3iRWrCMcrRq3TvdTWgfWr4Ot1ZCtiqY= X-Google-Smtp-Source: ABdhPJwclFLDNDUmxeSPODZ253wgQNnVMBjIbozXxzJyL71xVqU1kicWz46q+Vb7sfwMFIPW7vDk0A== X-Received: by 2002:a0c:d6c6:0:b0:456:4e6a:b875 with SMTP id l6-20020a0cd6c6000000b004564e6ab875mr11378082qvi.34.1651531299323; Mon, 02 May 2022 15:41:39 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id c15-20020ac86e8f000000b002f39b99f6a2sm4865978qtv.60.2022.05.02.15.41.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 May 2022 15:41:38 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------M7Rz99LkcoEftVKx3002SibQ" Message-ID: <34236f4e-1c79-2301-5cd6-8a88add506cf@gmail.com> Date: Mon, 2 May 2022 18:41:38 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: External psql editor Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <7fef2d5f-6698-0bb5-11fe-ffd042a24ab1@wi3ck.info> <89e71248-2fa8-c6ee-9546-93286947ed3b@appl-ecosys.com> <972d9c5f4293b858a5b505e6af8debd1ca16cf3c.camel@nc.rr.com> <478d98fa-93a6-3c27-a9d4-8d735fdba18a@appl-ecosys.com> <06c83dc5167c9a1b3a724cab7e257591b5798ff9.camel@nc.rr.com> <1885615.1651526835@sss.pgh.pa.us> From: Mladen Gogala In-Reply-To: <1885615.1651526835@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------M7Rz99LkcoEftVKx3002SibQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/2/22 17:27, Tom Lane wrote: > Rich Shepard writes: >> On Mon, 2 May 2022, Reid Thompson wrote: >>> I believe that psql also uses readline, so my thought was that maybe these >>> instructions could enable you to map the 'move' keystrokes that you're >>> familiar with to be used while on the psql command line. A very quick test >>> seems to indicate that you can. >> Nope. No difference. > Perhaps your psql is built against libedit rather than readline. > > regards, tom lane > > That is easy enough to determine: mgogala@umajor ~]$ ldd `which psql`     linux-vdso.so.1 (0x00007ffded951000)     libpq.so.private13-5 => /lib64/libpq.so.private13-5 (0x00007ff145284000) _*libreadline.so.8 => /lib64/libreadline.so.8 (0x00007ff14522c000)*_     libm.so.6 => /lib64/libm.so.6 (0x00007ff145150000)     libc.so.6 => /lib64/libc.so.6 (0x00007ff144f49000)     libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007ff144eac000)     libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007ff144bbe000)     libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ff144b65000)     libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x00007ff144b09000)     libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007ff144ada000)     /lib64/ld-linux-x86-64.so.2 (0x00007ff14539a000)     libz.so.1 => /lib64/libz.so.1 (0x00007ff144ac0000)     libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ff1449e2000)     libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ff1449ca000)     libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ff1449c1000)     libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ff1449b0000)     libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff1449a9000)     libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff144995000)     liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007ff144982000)     libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007ff144962000)     libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ff144935000)     libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007ff1448fb000)     libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007ff144864000) [mgogala@umajor ~]$ Regards -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------M7Rz99LkcoEftVKx3002SibQ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 5/2/22 17:27, Tom Lane wrote:
Rich Shepard <rshepard@appl-ecosys.com> writes:
On Mon, 2 May 2022, Reid Thompson wrote:
I believe that psql also uses readline, so my thought was that maybe these
instructions could enable you to map the 'move' keystrokes that you're
familiar with to be used while on the psql command line. A very quick test
seems to indicate that you can.

      
Nope. No difference.
Perhaps your psql is built against libedit rather than readline.

			regards, tom lane


That is easy enough to determine:

mgogala@umajor ~]$ ldd `which psql`
    linux-vdso.so.1 (0x00007ffded951000)
    libpq.so.private13-5 => /lib64/libpq.so.private13-5 (0x00007ff145284000)
    libreadline.so.8 => /lib64/libreadline.so.8 (0x00007ff14522c000)
    libm.so.6 => /lib64/libm.so.6 (0x00007ff145150000)
    libc.so.6 => /lib64/libc.so.6 (0x00007ff144f49000)
    libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007ff144eac000)
    libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007ff144bbe000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007ff144b65000)
    libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x00007ff144b09000)
    libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007ff144ada000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff14539a000)
    libz.so.1 => /lib64/libz.so.1 (0x00007ff144ac0000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007ff1449e2000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007ff1449ca000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007ff1449c1000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007ff1449b0000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007ff1449a9000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007ff144995000)
    liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007ff144982000)
    libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007ff144962000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007ff144935000)
    libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007ff1448fb000)
    libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007ff144864000)
[mgogala@umajor ~]$


Regards

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------M7Rz99LkcoEftVKx3002SibQ--