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

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(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-23 04:59:59
Message-ID: CACLU5mSt4hOJhZgyh1gJYFmD-+xbk-VC8HMMYrxErDPzxR+UJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 22, 2022 at 5:51 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:

> 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
> ...
> 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).
>

Perl? I am building/running in VS2022 community edition.

https://app.screencast.com/RBwKbZeXFdBnO (screenshot) just working today (5
long days!)

> 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?). ...
>
yeah, readline does not build well in windows without some "tweaks", I am
working with someone.
They are reaching back to see if we can get the updates pushed back into
readline, as Tom
requested we not require supporting our own branch. Currently it's a
single patch file,
plus some "glue"... (putting the terminal in CHAR mode, and binary mode vs
line mode, etc)

> 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.
>

Thomas, thanks for that! So new to this, I didn't realize... That's a
great idea.
Honestly not sure how to even run it?

I probably should learn how to build with your build system.
And how to submit a patch. Let me get it working better (I don't think it
does multi-line yet).

Thanks for the support, it's encouraging... especially when I know there's
an 80% chance that
this may fail to get accepted for any number of reasons.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Danny Shemesh 2022-11-23 08:49:25 Index filter instead of index condition w/ IN / ANY queries above certain set size
Previous Message Kirk Wolak 2022-11-23 03:50:55 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...