Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Kirk Wolak <wolakk(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date: 2022-11-22 22:50:58
Message-ID: CA+hUKGK3rJtjaeUjUJwA5bs3OYtHc5=JCy-ReC6jLC-j5bna_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 22, 2022 at 4:25 AM Kirk Wolak <wolakk(at)gmail(dot)com> wrote:
> In researching this problem, it appears that the decision was made like 17yrs ago, when windows did not have a realistic "terminal" type interface. Assuming we target Windows 8.1 or higher, I believe this goes away.

FWIW PostgreSQL 16 will require Windows 10+. Not a Windows user
myself, but I read somewhere that Windows 8.1 has already started
showing full screen warnings at startup that security patches etc end
in January, while PostgreSQL 16 (the soonest release that could
include your changes) is expected late in the year.

> What we are looking for is a simple bullet point list of what would make such a contribution acceptable. And how far should we get through that list on our own, before getting some help, especially from the build teams? [Our goal would be an NEW Config type flag: READLINE_FOR_WINDOWS (you guys name it, and control the default setting)]

Some thoughts:

Re configuration flags: don't waste time with the old perl-based build
system. The configuration should be done only with the new meson
build system (soon to be the only way to build on Windows).

I didn't quite understand if you were saying that readline itself
needs patches for this (I gather from earlier threads about this that
there were some problems with dll symbol export stuff, so maybe that's
it?). In passing, I noticed that there is also a Windows port of
editline AKA libedit, the BSD-licensed alternative to readline. It
has a compatible API and PostgreSQL can use that too. I have no idea
which is easier, more supported, etc on Windows.

It's OK to post a work-in-progress patch to pgsql-hackers, even if it
doesn't work right yet. With any luck, people will show up to help
with problems. I am 100% sure that our Windows user community would
love this feature. It would be good if the tests in
src/bin/psql/t/010_tab_completion.pl pass on Windows, but if that's
hard, don't let that stop you sharing a patch.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wolak 2022-11-23 03:50:55 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Previous Message David G. Johnston 2022-11-22 21:27:43 Re: Puzzled by ROW constructor behaviour?