Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Дата
Msg-id 29814.1406155122@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars  (Robert Fleming <fleminra@gmail.com>)
Ответы Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars  (Robert Fleming <fleminra@gmail.com>)
Список pgsql-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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Robert Fleming
Дата:
Сообщение: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Следующее
От: marius.bauer@here.com
Дата:
Сообщение: BUG #11031: Unexpected interval representations