From ea88824a3e2d2a610ceff43740391b2269939f77 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 10 Jun 2005 15:34:26 +0000 Subject: 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 --- doc/src/sgml/ref/psql-ref.sgml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'doc/src') 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 @@ @@ -1987,6 +1987,28 @@ bar + + HISTFILE + + + This variable contains the filename used to save the history. + Its default value is ~/.psql_history. + For example, use: + +\set HISTFILE ~/.psql_history-:DBNAME + + in your ~/.psqlrc will get psql to + maintain a separate history for each database. + + + + This feature was shamelessly plagiarized from + Bash. + + + + + HISTSIZE -- cgit v1.2.3