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