Thread: pgsql: Write psql's ~/.psql_history file using history_truncate_file()
pgsql: Write psql's ~/.psql_history file using history_truncate_file()
From
tgl@postgresql.org (Tom Lane)
Date:
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 W�jtowicz. 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)