Re: Feature: psql - display current search_path in prompt

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Cc: 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-06-09 23:08:43
Message-ID: CAGECzQQBsaPHrbJ14y_W4bWDAwjAJ3Kjm9paKPrBR7YudicSwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Jun 2025 at 17:54, Florents Tselai <florents(dot)tselai(at)gmail(dot)com> wrote:
> Here’s a quick attempt that makes %S substitue for a search_path
> Like
> \set PROMPT1 'user:%n search_path: %S'

+ else
+ return PQuser(pset.db);

That seems like a copy paste error. If we don't have data for it, we
should either use the empty string, or some string like "<unknown>".

Other than that, the patch looks good (but I haven't tested it yet).

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitrios Apostolou 2025-06-09 23:46:39 [PATCH v2] parallel pg_restore: move offset-building phase to before forking
Previous Message Cary Huang 2025-06-09 23:04:16 Re: Support tid range scan in parallel?