Re: psql slash# command

Поиск
Список
Период
Сортировка
От Sibte Abbas
Тема Re: psql slash# command
Дата
Msg-id bd6a35510804101756t2023f3b3x8d0b78b536a6ba6e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql slash# command  ("Sibte Abbas" <sibtay@gmail.com>)
Список pgsql-patches
On Thu, Apr 3, 2008 at 7:54 PM, Sibte Abbas <sibtay@gmail.com> wrote:
On Sun, Mar 30, 2008 at 3:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:


I wonder whether it wouldn't be safer and more convenient if we defined
'\# n' as pulling command n into the edit buffer, rather than
immediately executing it.  Actual execution is only a <return> away,
but this definition would allow you to edit the command a bit more
before you execute it --- including \e to use an editor.  It also
closes the loop in terms of providing some confidence that you typed
the number you should have typed.

This makes more sense and also appears to be much safer. I will start modifying the patch as per this approach now.


Based on your feedback I have modified the attached patch as follows:

1) \# n opens command n into the edit buffer.

2) A new psql variable; SHOW_LINE_NO is added, which is consulted by the \s command.
    If it is set, \s prefixs each line of its output with an incrementing line number.

regards,
-- Sibte Abbas
Вложения

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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: Remove FATAL from pg_lzdecompress
Следующее
От: "Brendan Jurd"
Дата:
Сообщение: Typo in README