| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Lauri Siltanen <lauri(dot)siltanen(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Feature: psql - display current search_path in prompt |
| Date: | 2025-10-28 17:21:15 |
| Message-ID: | aQD7ixpSQzjiXcBS@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Oct 28, 2025 at 09:08:36AM +0800, Chao Li wrote:
>> On Oct 28, 2025, at 04:29, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> Here is what I have staged for commit. I ended up simplifying the patch a
>> bit. In particular, I thought better of the question mark business. It
>> looks like we ordinarily just skip values that can't be found, and an empty
>> search_path will appear as "" (two double-quotes), so you can still
>> distinguish empty versus not-available.
>
> +1, I like this idea.
Actually, I take it back. The following command to empty the search_path
will cause %S to be replaced with nothing, in which case you can't
distinguish empty versus not-reported.
SELECT pg_catalog.set_config('search_path', '', false);
So, I've added the question mark back.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Add-psql-PROMPT-variable-for-the-current-search_p.patch | text/plain | 2.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2025-10-28 17:34:27 | Re: Channel binding for post-quantum cryptography |
| Previous Message | Álvaro Herrera | 2025-10-28 17:13:30 | Re: Bug in pg_stat_statements |