pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Fleming <fleminra@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Date: Wed, 23 Jul 2014 18:38:42 -0400
Message-ID: <29814.1406155122@sss.pgh.pa.us> (raw)
In-Reply-To: <CABA-fbh5Gyx2Tm6gBr62Vm21Np5CmF-SwgN-mTbUVMw0O7g+XQ@mail.gmail.com>
References: <20140723175629.27768.38545@wrigleys.postgresql.org>
	<23902.1406142767@sss.pgh.pa.us>
	<CABA-fbh5Gyx2Tm6gBr62Vm21Np5CmF-SwgN-mTbUVMw0O7g+XQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Robert Fleming <fleminra@gmail.com> writes:
> Yes, sorry, actually it's using libedit. Is that supported?

Ah.  We support libedit, but I'd not be a bit surprised if it does not
cope well with non-printing characters ...

A quick look into the readline.h supplied on my Mac OS X 10.9 machine
(which is from libedit not GNU readline) says that it defines
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE, so at least in theory
you'd expect it to work.  A bit of experimentation says that it doesn't
work all that well though compared to my Linux box :-(.  Now, Apple has a
long track record of shipping broken versions of libedit, so this doesn't
prove a whole lot about what will happen on other platforms.

I'd make sure that PG was compiled against a version of readline.h that
provided definitions for RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE.
If it was, then whatever misbehavior you're seeing can be blamed on
libedit.  If you're using an old version of libedit it's possible that a
newer one would work better.  But really, libedit is full of inadequacies;
if you can possibly switch to GNU readline you'll probably be happier.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <29814.1406155122@sss.pgh.pa.us>
Permalink:  ../29814.1406155122@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29814.1406155122@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fleminra@gmail.com
  Subject: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
  In-Reply-To: <29814.1406155122@sss.pgh.pa.us>
  References: <20140723175629.27768.38545@wrigleys.postgresql.org> <23902.1406142767@sss.pgh.pa.us> <CABA-fbh5Gyx2Tm6gBr62Vm21Np5CmF-SwgN-mTbUVMw0O7g+XQ@mail.gmail.com> <29814.1406155122@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