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

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

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2024-07-09 09:14:33 +0100, Dave Page wrote:
>> 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.

One thing that struck me while looking at tab-complete.c just now is
that there are aspects of the readline API that require strings to be
malloc'd by the client (tab-complete.c) and later free'd within
libreadline. I wonder how that will play with Windows' weird rules
about when one DLL's malloc pool will interoperate with another's
(cf PQfreemem). Worst case: the reason no one uses readline under
Windows is that it flat out doesn't work.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-07-09 22:01:23 Re: Introduce XID age and inactive timeout based replication slot invalidation
Previous Message Erik Wienhold 2024-07-09 20:46:07 Re: XML test error on Arch Linux