Idea Feedback: psql \h misses -> Offers Links?
Kirk Wolak <wolakk@gmail.com>
From: Kirk Wolak <wolakk@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>,
Nikolay Samokhvalov <samokhvalov@gmail.com>
Date: 2024-04-17T17:47:05Z
Lists: pgsql-hackers
Hackers,
I often use the ctrl-click on the link after getting help in psql. A
great feature.
Challenge, when there is no help, you don't get any link.
My thought process is to add a default response that would take them to
https://www.postgresql.org/search/?u=%2Fdocs%2F16%2F&q={TOKEN}
<https://www.postgresql.org/search/?u=%2Fdocs%2F16%2F&q=%7BTOKEN%7D>
*Example:*
\h current_setting
No help available for "current_setting".
Try \h with no arguments to see available help.
https://www.postgresql.org/search/?u=%2Fdocs%2F16%2F&q=current_setting
To me, this is a huge step in helping me get to the docs.
This is Question 1: Do others see the potential value here?
Question 2: What if we allowed the users to set some extra link Templates
using \pset??
\pset help_assist_link_1 = https://www.google.com/search?q={token}'
\pset help_assist_link_2 = '
https://wiki.postgresql.org/index.php?title=Special%3ASearch&search={token}&go=Go
<https://wiki.postgresql.org/index.php?title=Special%3ASearch&search=%7Btoken%7D&go=Go>
'
Such that the output, this time would be:
*Example:*
\h current_setting
No help available for "current_setting".
Try \h with no arguments to see available help.
https://www.postgresql.org/search/?u=%2Fdocs%2F16%2F&q=current_setting
https://www.google.com/search?q=current_setting
https://wiki.postgresql.org/index.php?title=Special%3ASearch&search=current_setting&go=Go
This Latter feature, I would consider applying to even successful searches?
[Based on Feedback here]
Thoughts?