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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Write psql's ~/.psql_history file using history_truncate_file()
Date: 2009-09-13 22:18:22
Message-ID: 20090913221822.F0317753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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 Wjtowicz.

Modified Files:
--------------
pgsql:
configure (r1.655 -> r1.656)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure?r1=1.655&r2=1.656)
configure.in (r1.610 -> r1.611)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure.in?r1=1.610&r2=1.611)
pgsql/src/bin/psql:
command.c (r1.206 -> r1.207)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/command.c?r1=1.206&r2=1.207)
input.c (r1.66 -> r1.67)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/input.c?r1=1.66&r2=1.67)
input.h (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/input.h?r1=1.32&r2=1.33)
pgsql/src/include:
pg_config.h.in (r1.141 -> r1.142)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pg_config.h.in?r1=1.141&r2=1.142)
pg_config.h.win32 (r1.63 -> r1.64)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pg_config.h.win32?r1=1.63&r2=1.64)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2009-09-13 22:23:04 Re: [COMMITTERS] pgsql: Add Unicode support in PL/Python
Previous Message Peter Eisentraut 2009-09-13 22:12:47 Re: [COMMITTERS] pgsql: Add Unicode support in PL/Python