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

From Tom Lane
Subject Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date
Msg-id 28773.1578436137@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add basic TAP tests for psql's tab-completion logic.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Add basic TAP tests for psql's tab-completion logic.  (Robert Haas <robertmhaas@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Removing pg_pltemplate and creating "trustable" extensions
Next
From: "Nasby, Jim"
Date:
Subject: Re: Proposal: Global Index