diff options
author | Bruce Momjian | 2005-06-10 15:34:26 +0000 |
---|---|---|
committer | Bruce Momjian | 2005-06-10 15:34:26 +0000 |
commit | ea88824a3e2d2a610ceff43740391b2269939f77 (patch) | |
tree | 23ae0fa564d91616b87b68dd706d55fadcadc2ff /doc/src | |
parent | 92eadf6c4a5cc762e3829b360d4ac4d51cae03fb (diff) |
the following patch makes the filename used to store the readline
history customizable through a variable named HISTFILE, analogous to
psql's already implemented HISTCONTROL and HISTSIZE variables, and
bash's HISTFILE-Variable.
The motivation was to be able to get psql to maintain separate
histories for separate databases. This is now easily achievable
through a line like the following in ~/.psqlrc:
\set HISTFILE ~/.psql_history-:DBNAME
Andreas Seltenreich
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/psql-ref.sgml | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 148fd0807dc..075225b6fb2 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.139 2005/06/09 15:27:26 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.140 2005/06/10 15:34:25 momjian Exp $ PostgreSQL documentation --> @@ -1988,6 +1988,28 @@ bar </varlistentry> <varlistentry> + <term><varname>HISTFILE</varname></term> + <listitem> + <para> + This variable contains the filename used to save the history. + Its default value is <filename>~/.psql_history</filename>. + For example, use: +<programlisting> +\set HISTFILE ~/.psql_history-:DBNAME +</programlisting> + in your <filename>~/.psqlrc</filename> will get psql to + maintain a separate history for each database. + </para> + <note> + <para> + This feature was shamelessly plagiarized from + <application>Bash</application>. + </para> + </note> + </listitem> + </varlistentry> + + <varlistentry> <term><varname>HISTSIZE</varname></term> <listitem> <para> |