Re: psql: make %P prompt option consistent when not connected

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql: make %P prompt option consistent when not connected
Date: 2026-01-29 00:32:14
Message-ID: aXqqjk6cv34oYsCU@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 28, 2026 at 04:38:08PM +0800, Chao Li wrote:
> While reviewing and testing patch [1], I noticed that psql’s %P
> prompt option does not check pset.db, which makes it inconsistent
> with other prompt options. As a result, when there is no database
> connection, other prompt elements are suppressed, but the pipeline
> status is still shown.

Point taken. It's true that it is confusing to show an "off" status
in this case if we don't have an active connection. Will adjust and
backpatch.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message surya poondla 2026-01-29 00:56:19 Re: Add comments about fire_triggers argument in ri_triggers.c
Previous Message Michael Paquier 2026-01-29 00:22:20 Re: Correction to comment of brin_range_deserialize