Re: [GENERAL] Server name in psql prompt

2010-01-09 Thread Mark Morgan Lloyd
Mark Morgan Lloyd wrote: I thought earlier that I could use finger as a hack for querying the server, i.e. I could put e.g. a disc set name in /home/postgres/.plan. However I then realised that I'd need %M to be expanded before %`, so that I could do something like \set PROMPT1 '`finger postg

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Mark Morgan Lloyd
Adrian Klaver wrote: In the case you describe the below might work: http://www.postgresql.org/docs/8.4/interactive/app-psql.html "Before starting up, psql attempts to read and execute commands from the system-wide psqlrc file and the user's ~/.psqlrc file. (On Windows, the user's startup file

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Adrian Klaver
On 01/08/2010 08:59 AM, Mark Morgan Lloyd wrote: hubert depesz lubaczewski wrote: On Fri, Jan 08, 2010 at 11:20:36AM +, Mark Morgan Lloyd wrote: 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.

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Mark Morgan Lloyd
hubert depesz lubaczewski wrote: On Fri, Jan 08, 2010 at 11:20:36AM +, Mark Morgan Lloyd wrote: 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

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Greg Sabino Mullane
-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 pre

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Simon Riggs
On Fri, 2010-01-08 at 11:20 +, Mark Morgan Lloyd wrote: > 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

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread hubert depesz lubaczewski
On Fri, Jan 08, 2010 at 11:20:36AM +, Mark Morgan Lloyd wrote: > 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 syst

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Glyn Astill
--- On Fri, 8/1/10, Mark Morgan Lloyd 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 i

Re: [GENERAL] Server name in psql prompt

2010-01-08 Thread Filip RembiaƂkowski
2010/1/8 Mark Morgan Lloyd > 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?

[GENERAL] Server name in psql prompt

2010-01-08 Thread Mark Morgan Lloyd
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? I've just come close to dropping