Re: Feature: psql - display current search_path in prompt - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Feature: psql - display current search_path in prompt
Date
Msg-id aQD7ixpSQzjiXcBS@nathan
Whole thread Raw
In response to Re: Feature: psql - display current search_path in prompt  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Feature: psql - display current search_path in prompt
List 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@gmail.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

pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Bug in pg_stat_statements
Next
From: Jacob Champion
Date:
Subject: Re: Channel binding for post-quantum cryptography