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

Поиск
Список
Период
Сортировка
От fleminra@gmail.com
Тема BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Дата
Msg-id 20140723175629.27768.38545@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11028
Logged by:          Robert Fleming
Email address:      fleminra@gmail.com
PostgreSQL version: 9.3.4
Operating system:   Ubuntu 14.04
Description:

See http://stackoverflow.com/questions/19139330/

Basically, the colorized prompt suggested in
http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
:

  testdb=> \set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%]%# '

results in strange readline behavior. In that prompt, "%[" should be
preceded by "%001" and "%]" should be followed by "%002".

It seems to me that either psql should do this automatically, or
http://www.postgresql.org/docs/9.3/static/app-psql.html#APP-PSQL-PROMPTING
should be updated to use "%001" and "%002".

Thanks!

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: syntax error WITH ORDINALITY
Следующее
От: David G Johnston
Дата:
Сообщение: Re: syntax error WITH ORDINALITY