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 CACLU5mQ-z_AF7CULx=nR8DOOOYg+uMFq7x2G4MtEh02Gd5W01w@mail.gmail.com
Whole thread Raw
In response to Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Andres Freund <andres@anarazel.de>)
List pgsql-general
On Wed, Nov 23, 2022 at 6:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andres Freund <andres@anarazel.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!
 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Next
From: Kirk Wolak
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...