Re: Feature: psql - display current search_path in prompt

2025-06-12 Thread Florents Tselai
On Wed, Jun 11, 2025 at 1:01 PM Florents Tselai wrote: > > > > On Wed, Jun 11, 2025 at 12:51 PM Jim Jones > wrote: > >> On 10.06.25 15:37, Florents Tselai wrote: >> > EDIT: There are test under `src/psql/t` , not sure though how much >> > coverage they have, >> > but most importantly how it’d lo

Re: Feature: psql - display current search_path in prompt

2025-06-11 Thread Florents Tselai
On Wed, Jun 11, 2025 at 12:51 PM Jim Jones wrote: > On 10.06.25 15:37, Florents Tselai wrote: > > EDIT: There are test under `src/psql/t` , not sure though how much > > coverage they have, > > but most importantly how it’d look like for this case. > > I took a look at these files, but I'm still u

Re: Feature: psql - display current search_path in prompt

2025-06-11 Thread Jim Jones
On 10.06.25 15:37, Florents Tselai wrote: > EDIT: There are test under `src/psql/t` , not sure though how much > coverage they have, > but most importantly how it’d look like for this case.  I took a look at these files, but I'm still unsure how to use them for automated prompt checking - I'm not

Re: Feature: psql - display current search_path in prompt

2025-06-10 Thread Florents Tselai
> On 10 Jun 2025, at 4:09 PM, Florents Tselai wrote: > > > >> On 10 Jun 2025, at 3:51 PM, Jim Jones wrote: >> >> Hi Florents >> >> On 10.06.25 13:36, Florents Tselai wrote: >>> >>> On Tue, Jun 10, 2025 at 2:08 AM Jelte Fennema-Nio >> > wrote: >>> >>>On Mon,

Re: Feature: psql - display current search_path in prompt

2025-06-10 Thread Florents Tselai
> On 10 Jun 2025, at 3:51 PM, Jim Jones wrote: > > Hi Florents > > On 10.06.25 13:36, Florents Tselai wrote: >> >> On Tue, Jun 10, 2025 at 2:08 AM Jelte Fennema-Nio > > wrote: >> >>On Mon, 9 Jun 2025 at 17:54, Florents Tselai >>mailto:florents.tse...@gmail.

Re: Feature: psql - display current search_path in prompt

2025-06-10 Thread Jim Jones
Hi Florents On 10.06.25 13:36, Florents Tselai wrote: > > On Tue, Jun 10, 2025 at 2:08 AM Jelte Fennema-Nio > wrote: > > On Mon, 9 Jun 2025 at 17:54, Florents Tselai > mailto:florents.tse...@gmail.com>> wrote: > > Here’s a quick attempt that makes %S subst

Re: Feature: psql - display current search_path in prompt

2025-06-10 Thread Florents Tselai
On Tue, Jun 10, 2025 at 2:08 AM Jelte Fennema-Nio wrote: > On Mon, 9 Jun 2025 at 17:54, Florents Tselai > 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

Re: Feature: psql - display current search_path in prompt

2025-06-09 Thread Jelte Fennema-Nio
On Mon, 9 Jun 2025 at 17:54, Florents Tselai 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

Re: Feature: psql - display current search_path in prompt

2025-06-09 Thread Florents Tselai
> On 8 Jun 2025, at 2:36 AM, Jelte Fennema-Nio wrote: > > On Sat, 7 Jun 2025 at 20:52, Lauri Siltanen wrote: >> I need to switch search_paths often. It would be tremendously helpful to see >> the current search_path in the prompt. > > That feature should be pretty easy to implement, now that

Re: Feature: psql - display current search_path in prompt

2025-06-07 Thread Jelte Fennema-Nio
On Sat, 7 Jun 2025 at 20:52, Lauri Siltanen wrote: > I need to switch search_paths often. It would be tremendously helpful to see > the current search_path in the prompt. That feature should be pretty easy to implement, now that search_path is marked as GUC_REPORT in PG18. Basically you need to

Feature: psql - display current search_path in prompt

2025-06-07 Thread Lauri Siltanen
Hi all, I need to switch search_paths often. It would be tremendously helpful to see the current search_path in the prompt. - Lauri Siltanen