-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
> Is there any way of getting psql to display the name of the
> currently-connected server in its prompt, and perhaps a custom string
> identifying e.g. a disc set, without having to create a psqlrc file on
> every client system that's got a precompiled psql installed?
Sure, use backticks to get what you want into there. For example,
here's one of my common prompts:
\set PROMPT1 '%n@%`hostname`:%>%R%#%x%x%x '
I once had a client that needed something more than that, so I
wrote a quick shell script that outputted the info on a single
line and then called the script inside the backticks.
- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201001080924
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAktHQIcACgkQvJuQZxSWSsgo6QCg5/4Rtx5Jnoso+i9P6+cph+1e
do8AoIVqlXg8u8Eb8NtPWm+Y2y+sYyfB
=gmZS
-----END PGP SIGNATURE-----