Re: RFC: Adding \history [options] [filename] to psql (Snippets and Shared Queries)

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: RFC: Adding \history [options] [filename] to psql (Snippets and Shared Queries)
Дата
Msg-id CABwTF4WzX6fYVQnJJ6oBZn2UL-RhsqybzgrbkSLTmpG=nkg-BQ@mail.gmail.com
обсуждение исходный текст
Ответ на RFC: Adding \history [options] [filename] to psql (Snippets and Shared Queries)  (Kirk Wolak <wolakk@gmail.com>)
Ответы Re: RFC: Adding \history [options] [filename] to psql (Snippets and Shared Queries)
Список pgsql-hackers
On Mon, Jun 5, 2023 at 8:58 AM Kirk Wolak <wolakk@gmail.com> wrote:
>
> Everyone,
>   After recently deep diving on some readline features and optimizing my bash environment to have a static set of
"snippets"that I can always find... 
>
>   it takes just a couple of history API calls to add some interesting features for those  that want them.  The result
ofadding 3-4 such commands (all under \history, and with compatible flags): 
>
> - Saving your current history without exiting (currently doable as \s :HISTFILE)
> - Reloading your history file (so you can easily share something across sessions) w/o exiting.
> - Stack Loading of specific history (like a shared snippets library, and a personal snippets library) [clearing your
history,then loading them in a custom order] 
>
>   The upside is really about clearly identifying and sharing permanent snippets, while having that list be editable
externally. Again, bringing teams online who don't always know the PG way of doing things (Waits, Locks, Space, High
CPUqueries, Running Queries). 
>
>   My intention is to leverage the way PSQL keeps the Comment above the SQL with the SQL.
> Then I can step backwards searching for "context" markers (Ctrl-R) or
> -- <CONTEXT> [F8] {history-search-backward}
>
>   To rip through my snippets
>
> Kirk...
> PS: I could do all of this under \s [options] [filename] it's just less clear...

Understandably, there doesn't seem to be a lot of enthusiasm for this.
If you could show others a sample/demo session of what the UI and UX
would look like, maybe others can chime in with either their opinion
of the behaviour, or perhaps a better/different way of achieving that.

Best regards,
Gurjeet
http://Gurje.et



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

Предыдущее
От: Gurjeet Singh
Дата:
Сообщение: Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Document that server will start even if it's unable to open some TCP/IP ports