From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org> |
Subject: | Re: [Patch] New psql prompt substitution %r (m = master, r = replica) |
Date: | 2016-08-18 18:41:16 |
Message-ID: | d76d2619-6fc1-3f06-b945-fc053fdf2012@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8/18/16 10:05 AM, Alvaro Herrera wrote:
> Bash has PROMPT_COMMAND, which is executed prior to issuing each prompt.
> What about introducing such a feature into psql? Then the \gset command
> you had in your first post could be used to set the variable correctly
> just before each prompt.
As someone that has the backend PID in his prompt... +1. Or
alternatively, a command that is just run when the connection changes
instead of every command...
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2016-08-18 18:45:55 | Re: WIP: About CMake v2 |
Previous Message | Robert Haas | 2016-08-18 18:40:46 | Re: Bug in to_timestamp(). |