pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
Date: Sat, 04 Jan 2020 00:30:09 -0500
Message-ID: <3055.1578115809@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wzk3xfc53A0KZRe4Xu9TALRU=HSfSVZqx3jBuws08mG-ew@mail.gmail.com>
References: <20200103170226.GB32629@msg.df7cb.de>
	<26339.1578072930@sss.pgh.pa.us>
	<20200103174839.GD32629@msg.df7cb.de>
	<CA+TgmoZsPe_G1ssO6KVPqbMQHDEz=vHPQH1jxaSjpG_QxM7wUg@mail.gmail.com>
	<CAH2-WznPzfWHu8PQwv1Qjpf4wQVPaaWpoO5NunFz9zsYKB4uJA@mail.gmail.com>
	<22669.1578104202@sss.pgh.pa.us>
	<CAH2-WznyU3QxzRr12W_tJAzjwM9qd6bh_ZGx3Xupk3RqE1t72A@mail.gmail.com>
	<25298.1578106280@sss.pgh.pa.us>
	<CAH2-Wzkq4OELzn3yZvuqsPuso5JfSXdaD+yW=1VMz2YpXTBYxA@mail.gmail.com>
	<CAH2-Wzk3xfc53A0KZRe4Xu9TALRU=HSfSVZqx3jBuws08mG-ew@mail.gmail.com>

Peter Geoghegan <pg@bowt.ie> writes:
> On Fri, Jan 3, 2020 at 7:06 PM Peter Geoghegan <pg@bowt.ie> wrote:
>> No. Also tried setting PG_COLOR="off" and CLICOLOR=0 -- that also
>> didn't help. (This was based on possibly-relevant vars that "env"
>> showed were set).

Yeah, that's not terribly surprising, because if I'm reading those
escape sequences correctly they're not about color.  They seem to be
just cursor movement and line clearing, according to [1].

What I'm mystified by is why your copy of libreadline is choosing to
do that, rather than just space over to where the word should be printed
which is what every other copy seems to be doing.  I have a fresh new
Debian installation at hand, with

$ dpkg -l | grep readline
ii  libreadline-dev:amd64                 7.0-5                                amd64        GNU readline and history libraries, development files
ii  libreadline5:amd64                    5.2+dfsg-3+b13                       amd64        GNU readline and history libraries, run-time libraries
ii  libreadline7:amd64                    7.0-5                                amd64        GNU readline and history libraries, run-time libraries
ii  readline-common                       7.0-5                                all          GNU readline and history libraries, common files

and I'm not seeing the failure on it, either with TERM=xterm
or with TERM=xterm-256color.  So what's the missing ingredient?

> Removing the single check_completion() test from 010_tab_completion.pl
> that actually fails on my system ("offer multiple table choices")
> fixes the problem for me -- everything else passes.
> I suppose that this means that the problem is in "offer multiple table
> choices" specifically.

I'd hate to conclude that we can't test any completion behavior that
involves offering a list.

If we can't coerce libreadline into being less avant-garde in its
screen management, I suppose we could write a regex to recognize
xterm escape sequences and ignore those.  But I'd be happier about
this if I could reproduce the behavior.  I don't like the feeling
that there's something going on here that I don't understand.

BTW, it seems somewhat likely that this is less about libreadline
than about its dependency libtinfo.  On my machine that's from

ii  libtinfo6:amd64                       6.1+20181013-2+deb10u2               amd64        shared low-level terminfo library for terminal handling

what about yours?

			regards, tom lane

[1] https://www.xfree86.org/current/ctlseqs.html





view thread (64+ messages)  latest in thread

Message-ID: <3055.1578115809@sss.pgh.pa.us>
Permalink:  ../3055.1578115809@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3055.1578115809@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, robertmhaas@gmail.com, myon@debian.org, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Add basic TAP tests for psql's tab-completion logic.
  In-Reply-To: <3055.1578115809@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox