From: | Florents Tselai <florents(dot)tselai(at)gmail(dot)com> |
---|---|
To: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> |
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-10 11:36:53 |
Message-ID: | CA+v5N40esEJ2L8maoV=NERBrGCFZhAbqzY=GDgmqgVAeWAroVQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 10, 2025 at 2:08 AM Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
wrote:
> 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>".
>
Opted for an empty string
> Other than that, the patch looks good (but I haven't tested it yet).
>
Btw - I haven't worked on bin/psql code;
aren't these auto tested?
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Make-S-available-in-psql-PROMPTs-to-indicate-the-.patch | application/octet-stream | 2.7 KB |
v1-0002-Return-empty-string-if-search_path-not-found.patch | application/octet-stream | 601 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2025-06-10 11:51:35 | Re: pg_dump/pg_dumpall help synopses and terminology |
Previous Message | Ashutosh Bapat | 2025-06-10 11:09:58 | Re: Changing shared_buffers without restart |