Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxytu-0004fM-R3 for pgsql-general@arkaria.postgresql.org; Wed, 23 Nov 2022 23:11:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxytt-0003BM-Pa for pgsql-general@arkaria.postgresql.org; Wed, 23 Nov 2022 23:11:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxytt-0003Ai-Ey for pgsql-general@lists.postgresql.org; Wed, 23 Nov 2022 23:11:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxytr-0001ru-00 for pgsql-general@lists.postgresql.org; Wed, 23 Nov 2022 23:11:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2ANNBMkp3755436; Wed, 23 Nov 2022 18:11:22 -0500 From: Tom Lane To: Andres Freund cc: Thomas Munro , Kirk Wolak , pgsql-general@lists.postgresql.org Subject: Re: Getting PSQL in Windows to support TAB/Autocomplete via modified readline... In-reply-to: <20221123230256.m23somxrmvdyoimk@awork3.anarazel.de> References: <3168699.1669046286@sss.pgh.pa.us> <20221123230256.m23somxrmvdyoimk@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 23 Nov 2022 15:02:56 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3755434.1669245082.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 23 Nov 2022 18:11:22 -0500 Message-ID: <3755435.1669245082@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund 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. W= e 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-compl= ete.c -rw-rw-r--. 1 postgres postgres 347 Apr 11 2022 src/bin/psql/tab-compl= ete.h -rw-rw-r--. 1 postgres postgres 838792 Nov 23 10:02 src/bin/psql/tab-compl= ete.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/gr= am.c -rw-rw-r--. 1 postgres postgres 12861 Nov 21 10:35 src/backend/parser/gr= am.h -rw-rw-r--. 1 postgres postgres 2183184 Nov 23 10:02 src/backend/parser/gr= am.o -rw-rw-r--. 1 postgres postgres 476700 Nov 21 10:34 src/backend/parser/gr= am.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