Re: Feature: psql - display current search_path in prompt
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Florents Tselai <florents.tselai@gmail.com>
Cc: Lauri Siltanen <lauri.siltanen@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-06-09T23:08:43Z
Lists: pgsql-hackers
On Mon, 9 Jun 2025 at 17:54, Florents Tselai <florents.tselai@gmail.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).
Commits
-
Add psql PROMPT variable for search_path.
- b3ce55f413cd 19 (unreleased) landed
-
doc PG 18 relnotes: add AFTER trigger user change item
- 73e26cbeb592 18.0 cited