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

From: Kirk Wolak <wolakk(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date: 2022-11-24 01:55:18
Message-ID: CACLU5mQ-z_AF7CULx=nR8DOOOYg+uMFq7x2G4MtEh02Gd5W01w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 23, 2022 at 6:11 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2022-11-21 10:58:06 -0500, Tom Lane wrote:
> >> It'd certainly be nice if we could use Readline on Windows.
>
> > 2) The last time I checked, msvc couldn't preprocess tab-complete.c with
> > USE_READLINE defined, due to running into some preprocessor limits.
> We can
> > probably fix that on our end somehow.
>
> Huh ... do you recall the details? Large as tab-complete is, it's
> far smaller than gram.y:
> ...

So I'm having a hard time guessing why we'd hit compiler limits
> in tab-complete if we can build the rest of the system.
>
> regards, tom lane
>

Oh, I hit them. In the tab-complete.c you have a SINGLE if/else that spans
over 2,000 lines.
And it blows up the STACK of the C Compiler (stack overflow). (It took 1
variable (if_continues)) and ENDING the if, and restarting it.

Also, the PREPROCESSOR you need the flag: "Use Standard Conforming
Processor" (or V_ARGS and NARGS breaks).
[ (/Zc:preprocessor) ]

of course SOMEONE should ask WHY use a non-conforming pre-processor??? It
cost me hours...

Currently I have a lot of it working, but I need to partner up with some of
the meson guys...
if it is already close to working, a couple of my tweaks could accelerate
it.

A Truly Happy Thanksgiving!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kirk Wolak 2022-11-24 02:04:25 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Previous Message Tom Lane 2022-11-24 01:28:29 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...