Christoph Berg <myon@debian.org> writes:
> Re: Tom Lane 2020-01-03 <13708.1578059577@sss.pgh.pa.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@postgresql.org