Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

From: Christoph Berg <myon(at)debian(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date: 2020-01-03 17:48:39
Message-ID: 20200103174839.GD32629@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Re: Tom Lane 2020-01-03 <26339(dot)1578072930(at)sss(dot)pgh(dot)pa(dot)us>
> Christoph Berg <myon(at)debian(dot)org> writes:
> > Re: Tom Lane 2020-01-03 <13708(dot)1578059577(at)sss(dot)pgh(dot)pa(dot)us>
> >> I found out while investigating this that the libedit version shipping
> >> with buster (3.1-20181209) is differently broken for the same case:
>
> > (Fwiw this wasn't spotted before because we have this LD_PRELOAD hack
> > that replaces libedit with readline at psql runtime.
>
> You do? I went looking in the Debian package source repo just the
> other day for some evidence that that was true, and couldn't find
> any, so I concluded that it was only an urban legend. Where is that
> done exactly?

/usr/share/postgresql-common/pg_wrapper

https://salsa.debian.org/postgresql/postgresql-common/blob/master/pg_wrapper#L129-157

> Perhaps more importantly, *why* is it done? It seems to me that it
> takes a pretty fevered imagination to suppose that using libreadline

Tom, claiming that things are "fevered" just because you didn't like
them is not appropriate. It's not fun working with PostgreSQL when the
tone is like that.

> that way meets the terms of its license but just building against
> the library normally would not. Certainly when I worked for Red Hat,
> their lawyers did not think there was any problem with building
> Postgres using both openssl and readline.

I'm not starting that debate here, but Debian thinks otherwise:

https://lwn.net/Articles/428111/

> The reason I'm concerned about this is that there's a patch on the
> table [1] that will probably not behave nicely at all if it's
> compiled against libedit headers and then executed with libreadline,
> because it will draw the wrong conclusions about whether the
> filename quoting hooks are available. So that hack is going to
> fail on you soon, especially after I add regression testing around
> the filename completion stuff ;-)

Well, so far, it worked well. (The biggest problem used to be that
libedit didn't have the history append function so it wasn't used even
with readline, but that got implemented ~2 years ago.)

Christoph

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-01-03 17:54:19 pgsql: Further fixes for tab-completion TAP tests.
Previous Message Tom Lane 2020-01-03 17:35:30 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-01-03 17:55:23 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Previous Message Melanie Plageman 2020-01-03 17:44:58 Re: accounting for memory used for BufFile during hash joins