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

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
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 20:20:01
Message-ID: CACLU5mRhZa-fT0-A_32XWJSk-phMjj2+vV19GpdjbBi1_xT24g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 23, 2022 at 6:56 AM Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
wrote:

> Am Tue, Nov 22, 2022 at 11:59:59PM -0500 schrieb Kirk Wolak:
>
> > > It's OK to post a work-in-progress patch to pgsql-hackers, even if it
> > > 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.
>

Okay, hours wasted. IO::Pty does not exist for win32 (yet)...
I ran the tests "manually" (OMG, I know why we automate this).

Anyways,* ALL tests passed EXCEPT filename completion* which crashes. LOL
And a spurious extra space output on "SELECT * FR\t" -> "SELECT * FR<space>"
when there should be none. Not in all situations, seems like ONLY when
suggestions
don't exist. I will attack this next.

And -n works! (Turning off readline)

> > 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.
>
> I don't think that estimate needs to be that pessimistic.
>

Karsten, you haven't seen the test results and the "walled garden" of
limitations I've created. :-)

I thought that was optimistic for a first-timer :-)
- Limited to UTF8 Support. (for now) [we use ACP calls, normally]
- Forces Binary Mode. Resetting terminal settings going in/out (and in
Mainloop).
- Chasing down memory leaks
- Not tested with redirection/piping or -i stuff yet.
- Not tested with "Difficult" Languages (Russian, CH, JA, KO, etc)

Any one of those could become a deal killer.

Regards Kirk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ted Toth 2022-11-23 21:49:26 Re: table inheritance partition and indexes
Previous Message Siddharth Jain 2022-11-23 20:13:34 Re: How to avoid having to run the GRANT command for newly added tables?