> Aha, exactly what I was looking for. Thanks!
Well I certainly feel dumb. The answer is right in the documentation, I just
failed to find it (I did look first). The system-wide psqlrc, and the ~/.psqlrc
files fit the bill perfectly, and the documentation explains it all quite
nicely. I accomplished my main goal better than I had even hoped. Our two
production servers are locked down and do not accept external connections. I
wanted to customize the prompt so I could tell at a glance which I was on. The
documentation even explains how to have a tcsh-like color prompt, which I use
quite extensively in bash. I now have a yellow prompt on one server, and a red
one on the other. How cool is that!
my system-wide psqlrc (/etc/sysconfig/pgsql/psqlrc on CentOS):
\set PROMPT1 %[%033[1;31;40m%]%n%[%033[0m%]@%/%R%# >
This puts the username in red, followed by @DBNAME in white, both on a black
background. I'll probably tweak this as I go, but this works for now.
Thanks to all for the help!
Sent - Gtek Web Mail