Write psql's ~/.psql_history file using history_truncate_file() and
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Sep 2009 22:18:22 +0000 (22:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 13 Sep 2009 22:18:22 +0000 (22:18 +0000)
commit7e7b2aac1a7a8af020a80c809b1ad0358a3ad4b6
tree01ca4e151349713e12b168c536bdfb5528ca8ee6
parentc2379bc7916e373bf2e263e87072af783c8a9e7e
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.
configure
configure.in
src/bin/psql/command.c
src/bin/psql/input.c
src/bin/psql/input.h
src/include/pg_config.h.in
src/include/pg_config.h.win32