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

From Tom Lane
Subject Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Date
Msg-id 3755435.1669245082@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Andres Freund <andres@anarazel.de>)
Responses Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Andres Freund <andres@anarazel.de>)
Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...  (Kirk Wolak <wolakk@gmail.com>)
List pgsql-general
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:

$ ll src/bin/psql/tab-complete.*
-rw-rw-r--. 1 postgres postgres 227042 Nov 19 19:37 src/bin/psql/tab-complete.c
-rw-rw-r--. 1 postgres postgres    347 Apr 11  2022 src/bin/psql/tab-complete.h
-rw-rw-r--. 1 postgres postgres 838792 Nov 23 10:02 src/bin/psql/tab-complete.o
$ size src/bin/psql/tab-complete.o
   text    data     bss     dec     hex filename
 148550       0     128  148678   244c6 src/bin/psql/tab-complete.o
$ ll src/backend/parser/gram.*
-rw-rw-r--. 1 postgres postgres 2506806 Nov 21 10:35 src/backend/parser/gram.c
-rw-rw-r--. 1 postgres postgres   12861 Nov 21 10:35 src/backend/parser/gram.h
-rw-rw-r--. 1 postgres postgres 2183184 Nov 23 10:02 src/backend/parser/gram.o
-rw-rw-r--. 1 postgres postgres  476700 Nov 21 10:34 src/backend/parser/gram.y
$ size src/backend/parser/gram.o
   text    data     bss     dec     hex filename
 620127       0       0  620127   9765f src/backend/parser/gram.o

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



pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Next
From: Andres Freund
Date:
Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...