Re: psql on Windows systems

From: Holger Jakobs <holger(at)jakobs(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: psql on Windows systems
Date: 2024-07-08 06:03:05
Message-ID: 68e53a89-bafb-4a3f-a2ce-be537a8285a4@jakobs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Am 06.07.24 um 07:51 schrieb Laurenz Albe:
> On Fri, 2024-07-05 at 20:47 +0200, Holger Jakobs wrote:
>>> Holger Jakobs <holger(at)jakobs(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sathish Reddy 2024-07-08 09:43:15 Detach partition concurrently from pg cron
Previous Message Zaid Shabbir 2024-07-08 03:13:39 Re: psql on Windows systems