[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pgsql-bugs
Subject:    Re: [BUGS] BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 ch
From:       Tom Lane <tgl () sss ! pgh ! pa ! us>
Date:       2014-07-23 22:38:42
Message-ID: 29814.1406155122 () sss ! pgh ! pa ! us
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic