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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Kirk Wolak <wolakk(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-23 23:11:22
Message-ID: 3755435.1669245082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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:

$ 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2022-11-24 00:41:44 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...
Previous Message Andres Freund 2022-11-23 23:02:56 Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline...