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

From Dave Page
Subject Re: Should we work around msvc failing to compile tab-complete.c?
Date
Msg-id CA+OCxox1JasgM4rynLrLC3OiFrEpyTps6QBWY=Mt96nstJGOsQ@mail.gmail.com
Whole thread Raw
In response to Re: Should we work around msvc failing to compile tab-complete.c?  (Andres Freund <andres@anarazel.de>)
Responses Re: Should we work around msvc failing to compile tab-complete.c?
Re: Should we work around msvc failing to compile tab-complete.c?
List pgsql-hackers


On Tue, 9 Jul 2024 at 17:23, Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2024-07-09 09:14:33 +0100, Dave Page wrote:
> On Mon, 8 Jul 2024 at 21:08, Andres Freund <andres@anarazel.de> wrote:
> > I think we'd need to backpatch more for older branches. At least
> >
> > commit 3f28bd7337d
> > Author: Thomas Munro <tmunro@postgresql.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.

I'm not sure (I mean that literally, not as a way to state that I think it's
not as you say) it'd actually be *that* big a problem to use readline - sure
it'd make psql GPL, but that's the only thing using readline. Since psql
doesn't link to extensible / user provided code, it might actually be ok.

With openssl < 3.0 the mix between openssl and readline would be problematic,
IIRC the licenses aren't really compatible. But luckily openssl relicensed to
apache v2.

Certainly in the case of the packages produced at EDB, we didn't want any potential surprises for users/redistributors/embedders, so *any* GPL was a problem.
 
But that is pretty orthogonal to the issue at hand:

Right.

What is more relevant is that as far as I can see, we've never actually supported either libedit or readline in MSVC++ builds - which kinda makes sense because Windows terminals are very different from traditional *nix ones. Windows isn't supported by either libedit or readline as far as I can see, except through a couple of forks.

I imagine from mingw/cygwin builds, readline would only actually work properly in their respective terminals.

--

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Lock-free compaction. Why not?
Next
From: David Rowley
Date:
Subject: Re: MERGE/SPLIT partition commands should create new partitions in the parent's tablespace?