Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline... - Mailing list pgsql-general

From Kirk Wolak
Subject Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date
Msg-id CACLU5mRhZa-fT0-A_32XWJSk-phMjj2+vV19GpdjbBi1_xT24g@mail.gmail.com
Whole thread Raw
In response to Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
On Wed, Nov 23, 2022 at 6:56 AM Karsten Hilbert <Karsten.Hilbert@gmx.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

 

pgsql-general by date:

Previous
From: Siddharth Jain
Date:
Subject: Re: How to avoid having to run the GRANT command for newly added tables?
Next
From: Ted Toth
Date:
Subject: Re: table inheritance partition and indexes