Re: Feature request: make cluster_name GUC useful for psql prompts - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Feature request: make cluster_name GUC useful for psql prompts
Date
Msg-id 20160506200333.GA284072@alvherre.pgsql
Whole thread Raw
In response to Re: Feature request: make cluster_name GUC useful for psql prompts  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-hackers
Jerry Sievers wrote:
> Steve Crawford <scrawford@pinpointresearch.com> writes:
> 
> > That is almost identical to the solution I suggested a week or two ago to someone tackling the issue and the hack
workson initial connection.
 
> >
> > Connect to a different cluster with "\c", however, and it will leave the prompt showing you connected to the
originaldatabase which is not good.
 
> 
> True and I've always thought of it as a possible misfeature of psql that
> it scans .psqlrc only once.

Interesting point.  I think what you're saying boils down to there being
two init files, one that is read once at program start (sets up the
general environment) and another one that's executed each time a
connection is established.

I wonder where does this leave Greg Stark's concurrent psql sessions
feature.

Now, for the current case I think we should definitely have a specifier
for the prompt.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Initial release notes created for 9.6
Next
From: Tom Lane
Date:
Subject: Re: Initial release notes created for 9.6