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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christoph Berg <myon(at)debian(dot)org>
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:35:30
Message-ID: 26339.1578072930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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?

Perhaps more importantly, *why* is it done? It seems to me that it
takes a pretty fevered imagination to suppose that using libreadline
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.

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 ;-)

>> I used a "note" command to print it, maybe that's not best practice?

> I think best practice is to use something like
> like($out, qr/$pattern/, $annotation)

I'll check into that, thanks!

regards, tom lane

[1] https://www.postgresql.org/message-id/flat/16059-8836946734c02b84(at)postgresql(dot)org

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Christoph Berg 2020-01-03 17:48:39 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Previous Message Dagfinn Ilmari Mannsåker 2020-01-03 17:12:09 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-01-03 17:37:19 Re: Greatest Common Divisor
Previous Message Dagfinn Ilmari Mannsåker 2020-01-03 17:12:09 Re: pgsql: Add basic TAP tests for psql's tab-completion logic.