Re: Seperate command-line histories for seperate databases

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: Seperate command-line histories for seperate databases
Дата
Msg-id
200603171630.k2HGU9k05506@candle.pha.pa.us
Ответ на
Список
Дерево обсуждения
Re: Seperate command-line histories for seperate databases Chris Browne <cbbrowne@acm.org>
Re: Seperate command-line histories for seperate databases Darcy Buskermolen <darcy@wavefire.com>
Re: Seperate command-line histories for seperate databases Andrew Dunstan <andrew@dunslane.net>
Re: Seperate command-line histories for seperate databases Tom Lane <tgl@sss.pgh.pa.us>
Re: Seperate command-line histories for seperate databases Bruce Momjian <pgman@candle.pha.pa.us>
Peter Eisentraut wrote:
> Someone sent the following request to the Debian bug tracking system:
> 
> """
> It'd be nice if the .psql_history file were per-database. This is
> because the commands executed on different databases are likely to be
> very different, so there is no good reason to lose history for db1 when
> working with db2, especially since the new history from db2 is probably
> not useful for db1.
> 
> I'd suggest giving psql a directory, and naming history like this:
> 
>         .psql/history/hostname/dbname
> """
> 
> There is undoubtedly some merit to that, but I still have my doubts.  But at 
> least we can discuss it.  Comments?

The psql manual pages for 8.1 now has:
      HISTFILE             The  file  name that will be used to store the his-             tory list. The default  value  is  ~/.psql_history.             For example, putting
             \set HISTFILE ~/.psql_history- :DBNAME
             in ~/.psqlrc will cause psql to maintain a separate             history for each database.

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +

В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
От: Peter Eisentraut
Дата:
FAQ