Re: Suggested fix for \p and \r in psql

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Suggested fix for \p and \r in psql
Дата
Msg-id alpine.DEB.2.20.1704021736080.4632@lancre
обсуждение исходный текст
Ответ на Suggested fix for \p and \r in psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
>> 1. \p ignores the "previous buffer". Example:
>
> Yeah, I did that intentionally, thinking that the old behavior was
> confusing.  We can certainly discuss it though.  I'd tend to agree
> with your point that \p and \w should print the same thing, but
> maybe neither of them should look at the previous_buf.

After some testing:

ISTM that \p should print what \g would execute, otherwise there is no 
consistent way to look at what \g would do.

Currently \e allows to look at this (previous) executed buffer by editing 
it, but I would find it more consistent if \p is in sync with that, and \e 
also coldly executes the command on return if it ends with ";".

>> 2. \r keeps the "previous buffer". I think it should clear it.
>
> I don't really agree with this.  The fact that it used to clear both
> buffers was an implementation accident that probably nobody had even
> understood clearly.  ISTM that loses functionality because you can't
> do \g anymore.

I agree on this one.

-- 
Fabien.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Suggested fix for \p and \r in psql
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: Undefined psql variables