October 31st, 2013, 01:21 PM
Per Server PROMPT1 Changes for Remote Connections?
I've searched high and low for this, but haven't found anything in the docs, which leads me to believe it's not implemented.
I'd like to change the prompt for our production server to have a red background, or have "** PRODUCTION **" or something prepended to the prompt. I'm able to do that server wide via the psqlrc file, but that only works if people run psql on the server itself.
If instead a user runs psql from their desktop, only their local config is used, which is a problem as they will access both dev, test, and live DB servers. I haven't found a way to present a unique prompt per server they access (or per DB they access).
Is there a way to change the prompt on the server side? Per database?
I'd appreciate any pointers,
November 1st, 2013, 04:55 PM
So you want the server to force a prompt-color on the client?
Have you asked this on the PostgreSQL mailinglists? Because if it's possible the makers of PostgreSQl will now...
November 4th, 2013, 08:02 PM
Yes that is correct, I can ask there, but I think I've found this is just not possible. psql is a client application, and thus can only be impacted by client settings.
Originally Posted by Vinny42