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: Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date: 2020-01-07 22:28:57
Message-ID: 28773.1578436137@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

I wrote:
> I installed libedit_3.1-20150325.orig.tar.gz from source here, and it
> passes our current regression test and seems to behave just fine in
> light manual testing. (I did not apply any of the Debian-specific
> patches at [1], but they don't look like they'd explain much.)
> So I'm a bit at a loss as to what's going wrong for you. Is the test
> environment for Xenial the same as for the other branches?

To dig deeper, I set up an actual installation of xenial, and on that
I can replicate the tab-completion misbehavior you reported. The cause
appears to be that libedit's rl_line_buffer does not contain the current
line as expected, but the previous line (or, initially, an empty string).
Thus, the hack I put in to make things pass on current libedit actually
makes things worse on this version --- although it doesn't fully pass
even if I revert ddd87d564, since there are other places where we
depend on rl_line_buffer to be valid.

So that raises the question: why does xenial's version of libedit
not match either its documentation or the distributed source code?
Because it doesn't.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-01-08 01:03:39 pgsql: Remove dependency to system calls for memory allocation in refin
Previous Message Alvaro Herrera 2020-01-07 21:16:24 Re: pgsql: pg_stat_activity: show NULL stmt start time for walsenders

Browse pgsql-hackers by date

  From Date Subject
Next Message Nasby, Jim 2020-01-07 22:55:13 Re: Proposal: Global Index
Previous Message Stephen Frost 2020-01-07 21:36:18 Re: Removing pg_pltemplate and creating "trustable" extensions