Re: Adding the host name to the PgSQL shell

Поиск
Список
Период
Сортировка
От Scott Mead
Тема Re: Adding the host name to the PgSQL shell
Дата
Msg-id d3ab2ec80906081021p6d8aadbbh35676b8f1295135d@mail.gmail.com
обсуждение исходный текст
Ответ на Adding the host name to the PgSQL shell  (Madison Kelly <linux@alteeve.com>)
Ответы Re: Adding the host name to the PgSQL shell  (Madison Kelly <linux@alteeve.com>)
Re: Adding the host name to the PgSQL shell  ("Roderick A. Anderson" <raanders@cyber-office.net>)
Список pgsql-general



On Mon, Jun 8, 2009 at 12:44 PM, Madison Kelly <linux@alteeve.com> wrote:
Hi all,

 I work on a development and production server, and I am always double-checking myself to make sure I am doing something on the right server.

 Is there a way, like in terminal shells, to change the PgSQL shell's prompt from 'db=>' to something like 'host@db=>'? I'm on PgSQL 8.1 (server on Debian) and 8.3 (devel on Ubuntu), in case it matters.

You certainly can do this, very similar to PS1 on linux with bash:

http://www.postgresql.org/docs/8.1/static/app-psql.html#APP-PSQL-PROMPTING

--Scott


Thanks all!

Madi

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: Ioana Danes
Дата:
Сообщение: Re: Duplicate key issue in a transaction block
Следующее
От: Madison Kelly
Дата:
Сообщение: Re: Adding the host name to the PgSQL shell