Re: Feature: psql - display current search_path in prompt

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Florents Tselai <florents(dot)tselai(at)gmail(dot)com>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, 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-10-23 20:52:23
Message-ID: aPqVh13jJhtog4F3@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 12, 2025 at 06:57:37PM +0300, Florents Tselai wrote:
> Absent any other feedback I'm marking this as Ready for Committer;
> Said committer can push back on my arbitrary %S selection
> https://commitfest.postgresql.org/patch/5808/

PQparameterStatus() will return NULL if the parameter is not known. So,
with this patch, using %S in a prompt when connected to a <v18 version of
PostgreSQL will produce an empty string. Given an empty string is a valid
value for search_path, I think we probably want to use a special value in
this case. Perhaps we could use "?", which is much less likely to be a
value for search_path.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2025-10-23 21:00:50 Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Previous Message Sami Imseih 2025-10-23 20:48:05 Re: another autovacuum scheduling thread