Skip site navigation (1) Skip section navigation (2)

psql prompt

From: Aleksey Tsalolikhin <atsaloli(dot)tech(at)gmail(dot)com>
To: Los Angeles PostgreSQL Users Group <lapug(at)postgresql(dot)org>
Subject: psql prompt
Date: 2010-03-26 20:40:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: lapug
Hi, list.  Just found out you can customize the psql prompt.

For example:

\set PROMPT1 '%n(at)%/ on %`hostname` (%M:%>) %# '

Tells you db user, db name, server hostname,
and the IP address and port that the db server
listens on, plus the prompt (regular or superuser).

If you like it, put it in your ~/.psqlrc

You can go fancy with colors, etc.




lapug by date

Next:From: Aleksey TsalolikhinDate: 2010-03-26 20:44:38
Subject: Re: psql prompt
Previous:From: Aleksey TsalolikhinDate: 2010-02-24 23:41:48
Subject: Re: Scale 8X Exhibition Booth Attendants

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group