Re: BUG #8094: psql prompt variable and command substitution broken
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #8094: psql prompt variable and command substitution broken |
| Дата | |
| Msg-id | 8164.1366310921@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #8094: psql prompt variable and command substitution broken (nyetter@gmail.com) |
| Ответы |
Re: BUG #8094: psql prompt variable and command substitution broken
|
| Список | pgsql-bugs |
nyetter@gmail.com writes:
> My psql PROMPT1, set through /etc/sysconfig/pgsql/psqlrc, is the following:
> h:%M%040d:%/%040U:%n%040AC:%:AUTOCOMMIT:%040TX:%x%012%R%#%040
You did not show us exactly how you set that, but I speculate that you
weren't bothering to quote it. 9.2 is more consistent than prior
versions were about expanding :variable references in backslash
commands, which means that you'd better quote the reference to
:AUTOCOMMIT if you don't want it expanded on-the-spot before it goes
into the prompt string. I'd suggest putting single quotes around the
argument of \set PROMPT1, viz
\set PROMPT1 'h:%M%040d:%/%040U:%n%040AC:%:AUTOCOMMIT:%040TX:%x%012%R%#%040'
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера