Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQhT5-00BCal-02 for pgsql-admin@arkaria.postgresql.org; Mon, 08 Jul 2024 06:03:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sQhT3-0021qG-JN for pgsql-admin@arkaria.postgresql.org; Mon, 08 Jul 2024 06:03:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQhT3-0021q8-6k for pgsql-admin@lists.postgresql.org; Mon, 08 Jul 2024 06:03:17 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sQhSv-000xvG-Ne for pgsql-admin@lists.postgresql.org; Mon, 08 Jul 2024 06:03:15 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 8F4BE380373; Mon, 8 Jul 2024 08:03:06 +0200 (CEST) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WA2Nlcds204D; Mon, 8 Jul 2024 08:03:06 +0200 (CEST) Received: from [192.168.178.30] (xdsl-87-79-171-224.nc.de [87.79.171.224]) by rs.plausibolo.de (Postfix) with ESMTPSA id 2DE0B38021D; Mon, 8 Jul 2024 08:03:06 +0200 (CEST) Message-ID: <68e53a89-bafb-4a3f-a2ce-be537a8285a4@jakobs.com> Date: Mon, 8 Jul 2024 08:03:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: psql on Windows systems To: pgsql-admin@lists.postgresql.org References: <326176.1720203825@sss.pgh.pa.us> <5e8626de-f7df-45c3-9985-f3cb6ec4e7ea@jakobs.com> <143e628cad21b4f48b6d0e5f539ebe384899548d.camel@cybertec.at> From: Holger Jakobs In-Reply-To: <143e628cad21b4f48b6d0e5f539ebe384899548d.camel@cybertec.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am 06.07.24 um 07:51 schrieb Laurenz Albe: > On Fri, 2024-07-05 at 20:47 +0200, Holger Jakobs wrote: >>> Holger Jakobs writes: >>>> Recently I had to use PostgreSQL on a Windows based system, and I was >>>> surprised that the psql tool behaves differently, when it comes to the >>>> functionality of the readline library. >> The page https://tiswww.cwru.edu/php/chet/readline/rltop.html says: >> >> "Microsoft offers its Windows Subsystem for Linux (WSL) as an installable add-on >> for Windows 10 and Windows 11. It's basically a separate packaged version of >> the Linux kernel that runs as a Windows service, and you can build and install >> readline-8.2 within that environment." Maybe it works when the machine doing >> the compiling and packaging has WSL installed. Would be worth trying, imho. > Yes, it should be simple to build "psql" with readline in that environment, so > I recommend that you do that. > > I guess the Windows binaries don't want to require the users to install > Microsoft's Linux emulation. After all, if you do that, you might as well > use the ready-made Linux binaries. > > Yours, > Laurenz Albe > I think that it would be possible to statically link any libraries which aren't available on a standard Windows installation lacking WSL. Of course, forcing WSL on all Windows users is a no-go. Maybe this link helps with that: https://stackoverflow.com/questions/4737082/statically-linked-correctly-working-readline-library-under-windows Kind Regards, Holger -- Holger Jakobs, Bergisch Gladbach