agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedpsql on Windows systems
8+ messages / 4 participants
[nested] [flat]
* psql on Windows systems
@ 2024-07-05 18:21 Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Re: psql on Windows systems Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:24 ` Re: psql on Windows systems Zaid Shabbir <zaidshabbir@gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: Holger Jakobs @ 2024-07-05 18:21 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Dear friends,
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.
There is no tab-completion for commands or schema/view/table names.
Also, browsing through previous commands within the history is different
from the psql version on Linux systems. Only single lines, not complete
commands show up in the history.
This may be due to some library differences, but wouldn't it be possible
to link some powerful readline and tab-completion libraries also on
Windows systems?
Maybe it's a question for psql developers, should I write on a different
list?
Kind Regards,
Holger
--
Holger Jakobs, Bergisch Gladbach
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
@ 2024-07-05 18:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:47 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
1 sibling, 1 reply; 8+ messages in thread
From: Tom Lane @ 2024-07-05 18:23 UTC (permalink / raw)
To: Holger Jakobs <holger@jakobs.com>; +Cc: pgsql-admin@lists.postgresql.org
Holger Jakobs <holger@jakobs.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.
Yeah, readline doesn't exist for Windows last I heard. At least,
we don't try to build with it there.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Re: psql on Windows systems Tom Lane <tgl@sss.pgh.pa.us>
@ 2024-07-05 18:47 ` Holger Jakobs <holger@jakobs.com>
2024-07-06 05:51 ` Re: psql on Windows systems Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 8+ messages in thread
From: Holger Jakobs @ 2024-07-05 18:47 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin@lists.postgresql.org
Am 05.07.24 um 20:23 schrieb Tom Lane:
> Holger Jakobs<holger@jakobs.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.
> Yeah, readline doesn't exist for Windows last I heard. At least,
> we don't try to build with it there.
>
> regards, tom lane
The page https://tiswww.cwru.edu/php/chet/readline/rltop.html says:
"Microsoft offers its Windows Subsystem for Linux (WSL)
<https://msdn.microsoft.com/en-us/commandline/wsl/about; 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.
The license of the Gnu readline library shouldn't impose any problem, as
other BSD/MIT-licensed software, like Tcl (https://tcl-lang.org) also
uses it.
Kind Regards,
Holger
--
Holger Jakobs, Bergisch Gladbach
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Re: psql on Windows systems Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:47 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
@ 2024-07-06 05:51 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-07-08 03:13 ` Re: psql on Windows systems Zaid Shabbir <zaidshabbir@gmail.com>
2024-07-08 06:03 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
0 siblings, 2 replies; 8+ messages in thread
From: Laurenz Albe @ 2024-07-06 05:51 UTC (permalink / raw)
To: Holger Jakobs <holger@jakobs.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin@lists.postgresql.org
On Fri, 2024-07-05 at 20:47 +0200, Holger Jakobs wrote:
> > Holger Jakobs <holger@jakobs.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
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Re: psql on Windows systems Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:47 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-06 05:51 ` Re: psql on Windows systems Laurenz Albe <laurenz.albe@cybertec.at>
@ 2024-07-08 03:13 ` Zaid Shabbir <zaidshabbir@gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: Zaid Shabbir @ 2024-07-08 03:13 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; tgl@sss.pgh.pa.us; +Cc: Holger Jakobs <holger@jakobs.com>; pgsql-admin@lists.postgresql.org
I think it's a good idea to provide the readline support in the community
Windows installer.
On Sat, Jul 6, 2024 at 10:51 AM Laurenz Albe <laurenz.albe@cybertec.at>
wrote:
> On Fri, 2024-07-05 at 20:47 +0200, Holger Jakobs wrote:
> > > Holger Jakobs <holger@jakobs.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
>
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Re: psql on Windows systems Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:47 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-06 05:51 ` Re: psql on Windows systems Laurenz Albe <laurenz.albe@cybertec.at>
@ 2024-07-08 06:03 ` Holger Jakobs <holger@jakobs.com>
1 sibling, 0 replies; 8+ messages in thread
From: Holger Jakobs @ 2024-07-08 06:03 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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@jakobs.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-und...
Kind Regards,
Holger
--
Holger Jakobs, Bergisch Gladbach
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
@ 2024-07-05 18:24 ` Zaid Shabbir <zaidshabbir@gmail.com>
2024-07-05 18:27 ` Re: psql on Windows systems Holger Jakobs <holger@jakobs.com>
1 sibling, 1 reply; 8+ messages in thread
From: Zaid Shabbir @ 2024-07-05 18:24 UTC (permalink / raw)
To: Holger Jakobs <holger@jakobs.com>; +Cc: pgsql-admin@lists.postgresql.org
On which windows platform you are
Have you face the same behaviour with the windows installer ?
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
On Fri, 5 Jul 2024 at 11:21 PM, Holger Jakobs <holger@jakobs.com> wrote:
> Dear friends,
>
> 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.
>
> There is no tab-completion for commands or schema/view/table names.
> Also, browsing through previous commands within the history is different
> from the psql version on Linux systems. Only single lines, not complete
> commands show up in the history.
>
> This may be due to some library differences, but wouldn't it be possible
> to link some powerful readline and tab-completion libraries also on
> Windows systems?
>
> Maybe it's a question for psql developers, should I write on a different
> list?
>
> Kind Regards,
>
> Holger
>
> --
>
> Holger Jakobs, Bergisch Gladbach
>
>
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: psql on Windows systems
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:24 ` Re: psql on Windows systems Zaid Shabbir <zaidshabbir@gmail.com>
@ 2024-07-05 18:27 ` Holger Jakobs <holger@jakobs.com>
0 siblings, 0 replies; 8+ messages in thread
From: Holger Jakobs @ 2024-07-05 18:27 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Am 05.07.24 um 20:24 schrieb Zaid Shabbir:
> On which windows platform you are
>
> Have you face the same behaviour with the windows installer ?
> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
>
> On Fri, 5 Jul 2024 at 11:21 PM, Holger Jakobs <holger@jakobs.com> wrote:
>
> Dear friends,
>
> 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.
>
> There is no tab-completion for commands or schema/view/table names.
> Also, browsing through previous commands within the history is
> different
> from the psql version on Linux systems. Only single lines, not
> complete
> commands show up in the history.
>
> This may be due to some library differences, but wouldn't it be
> possible
> to link some powerful readline and tab-completion libraries also on
> Windows systems?
>
> Maybe it's a question for psql developers, should I write on a
> different
> list?
>
> Kind Regards,
>
> Holger
>
> --
>
> Holger Jakobs, Bergisch Gladbach
>
>
>
Yes, I used the installer by Enterprise DB. It's an ordinary Windows
2022 server, but this doesn't make any difference.
--
Holger Jakobs, Bergisch Gladbachchat with me on Signal messenger
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2024-07-08 06:03 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05 18:21 psql on Windows systems Holger Jakobs <holger@jakobs.com>
2024-07-05 18:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-07-05 18:47 ` Holger Jakobs <holger@jakobs.com>
2024-07-06 05:51 ` Laurenz Albe <laurenz.albe@cybertec.at>
2024-07-08 03:13 ` Zaid Shabbir <zaidshabbir@gmail.com>
2024-07-08 06:03 ` Holger Jakobs <holger@jakobs.com>
2024-07-05 18:24 ` Zaid Shabbir <zaidshabbir@gmail.com>
2024-07-05 18:27 ` Holger Jakobs <holger@jakobs.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox