1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Write psql's ~/.psql_history file using history_truncate_file() and

append_history(), if libreadline is new enough to have those functions
(they seem to be present at least since 4.2; but libedit may not have them).
This gives significantly saner behavior when two or more sessions overlap in
their use of the history file; although having two sessions exit at just the
same time is still perilous to your history.  The behavior of \s remains
unchanged, ie, overwrite whatever was there.
Per bug #5052 from Marek Wójtowicz.
This commit is contained in:
Tom Lane
2009-09-13 22:18:22 +00:00
parent eb62398f39
commit e97281c46c
7 changed files with 88 additions and 31 deletions

View File

@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.610 2009/09/08 16:08:26 tgl Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.611 2009/09/13 22:18:22 tgl Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
@ -1316,7 +1316,7 @@ fi
if test "$with_readline" = yes; then
PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
AC_CHECK_FUNCS([replace_history_entry])
AC_CHECK_FUNCS([append_history history_truncate_file])
fi