summaryrefslogtreecommitdiff
path: root/src/bin/psql/input.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-09-13 22:18:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-09-13 22:18:22 +0000
commite97281c46cb14ecb91c473b6bd2b0435a50c0875 (patch)
tree82490966eb37a17515419cd61a42e7a58c34e201 /src/bin/psql/input.h
parenteb62398f391eedee7953becb410bf3ae86b9872b (diff)
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.
Diffstat (limited to 'src/bin/psql/input.h')
-rw-r--r--src/bin/psql/input.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h
index b2515c42f86..515445445ae 100644
--- a/src/bin/psql/input.h
+++ b/src/bin/psql/input.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.32 2009/08/24 16:18:13 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.33 2009/09/13 22:18:22 tgl Exp $
*/
#ifndef INPUT_H
#define INPUT_H
@@ -45,7 +45,7 @@ char *gets_interactive(const char *prompt);
char *gets_fromFile(FILE *source);
void initializeInput(int flags);
-bool saveHistory(char *fname, bool encodeFlag);
+bool saveHistory(char *fname, int max_lines, bool appendFlag, bool encodeFlag);
void pg_append_history(const char *s, PQExpBuffer history_buf);
void pg_send_history(PQExpBuffer history_buf);