Re: Making tab-complete.c easier to maintain - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Making tab-complete.c easier to maintain
Date
Msg-id 20151023013515.GH3685@tamriel.snowman.net
Whole thread Raw
In response to Re: Making tab-complete.c easier to maintain  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Making tab-complete.c easier to maintain  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> David Fetter <david@fetter.org> writes:
> > On Thu, Oct 22, 2015 at 04:05:06PM -0700, Tom Lane wrote:
> >> Given the license issues around GNU readline, requiring it seems like
> >> probably a non-starter.
>
> > I should have made this more clear.  I am not an IP attorney and don't
> > play one on TV, but this is what I've gotten out of conversations with
> > IP attorneys on this subject:
>
> I'm not an IP attorney either, and the ones I've talked to seem to agree
> with you.  (Red Hat's corporate attorneys, at least, certainly thought
> that when I last asked them.)  But the observed facts are that some
> distros refuse to ship psql-linked-to-readline, and substitute libedit
> instead, because they got different advice from their attorneys.

The issue for Debian, at least, isn't really about libreadline or
libedit, it's about the GPL and the OpenSSL license.  From the Debian
perspective, if we were able to build with GNUTLS or another SSL library
other than OpenSSL (which I know we've made some progress on, thanks
Heikki...) then Debian wouldn't have any problem shipping PG linked with
libreadline.

> If we desupport libedit, the end result is going to be these distros
> shipping psql with no command-line-editing support at all.  Our opinion,
> or even our lawyers' opinion, is unlikely to prevent that outcome.
>
> While libedit certainly has got its bugs and deficiencies, it's way better
> than nothing at all, so I think we'd better keep supporting it.

I agree that it's probably not a good idea to desupport libedit.
However, I don't believe supporting libedit necessairly prevents us
from providing better support when libreadline is available.
Debian-based distributions won't be able to reap the benefits of that
better support until we remove the OpenSSL dependency, which is
unfortunate, but other distributions would be able to.

Also, if the PG project is agreeable to it, there's no reason why we
couldn't provide full libreadline-enabled builds off of
apt.postgresql.org, regardless of what Debian wants.  That would add a
bit of extra burden on our package maintainers, as there isn't any
difference between packages built for Debian and packages built for
apt.p.o currently, I don't believe, but it seems like it'd be a pretty
minor change that would be well worth it if we get better libreadline
integration.

The one bit of all of this that worries me is that we would take
libreadline for granted and the libedit support would end up broken.
That seems a relatively minor concern though, as it sounds like there is
a fair bit of exercise of the libedit path due to the commercial forks
of PG which make use of it to avoid the GPL.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Avoid full page images in streaming replication?
Next
From: Robert Haas
Date:
Subject: Re: shm_mq fix for non-blocking mode