Re: Should we work around msvc failing to compile tab-complete.c?

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should we work around msvc failing to compile tab-complete.c?
Date: 2024-07-09 08:14:33
Message-ID: CA+OCxoySeRYNmt7yBahDYJWVNao5UUkYMx5wO7LP0ZM08+hd-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 8 Jul 2024 at 21:08, Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2024-07-08 14:18:03 -0400, Tom Lane wrote:
> > Andres Freund <andres(at)anarazel(dot)de> writes:
> > > Compiling postgres on windows with tab-completion support fails either
> with
> > > "fatal error C1026: parser stack overflow, program too complex”.
> > > or (in recent versions) with
> > > "…/src/bin/psql/tab-complete.c(4023): fatal error C1001: Internal
> compiler error."
> >
> > > It's pretty easy to work around the error [2]. I wonder if we should
> just do
> > > that, then we don't have to insist on a very new msvc version being
> used and
> > > it'll work even if they just decide to fix the internal compiler error.
> >
> > I'm on board with doing something here, but wouldn't we want to
> > back-patch at least a minimal fix to all supported branches?
>
> I think we'd need to backpatch more for older branches. At least
>
> commit 3f28bd7337d
> Author: Thomas Munro <tmunro(at)postgresql(dot)org>
> Date: 2022-12-22 17:14:23 +1300
>
> Add work-around for VA_ARGS_NARGS() on MSVC.
>
>
> Given that - afaict - tab completion never used to work with msvc, I think
> it'd be ok to just do it in 17 or 16+17 or such. Obviously nobody is
> currently
> building with readline support for windows - not sure if any packager is
> going
> to go back and add support for it in older branches.

Packagers aren't likely to be using readline, as it's GPL and it would have
to be shipped with packages on Windows. They are more likely to be using
libedit if anything. Not sure if that has any bearing on the compilation
failure.

--
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL: https://www.postgresql.org
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-07-09 09:08:26 Re: Injection points: preloading and runtime arguments
Previous Message Emanuel Calvo 2024-07-09 08:01:03 Re: [PATCH] TODO “Allow LISTEN on patterns”