git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c35169)
For psql multi-line history, save backslash commands right away, rather
Wed, 7 Jun 2006 13:18:37 +0000 (13:18 +0000)
Wed, 7 Jun 2006 13:18:37 +0000 (13:18 +0000)
than only if there is already history.


diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index d7f17f4b6ae40b27942daa57c6493a46ec1840ef..6c02ba1ccaec5aad68017b5b0b5e55ff8084ef87 100644 (file)
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.77 2006年06月05日 14:47:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.78 2006年06月07日 13:18:37 momjian Exp $
*/
#include "postgres_fe.h"
#include "mainloop.h"
@@ -309,7 +309,7 @@ MainLoop(FILE *source)
if (!line_saved_in_history && pset.cur_cmd_interactive)
{
/* Sending a command (PSQL_CMD_SEND) zeros the length */
- if (scan_result == PSCAN_BACKSLASH && history_buf->len != 0)
+ if (scan_result == PSCAN_BACKSLASH)
pg_write_history(line);
else
pg_append_history(line, history_buf);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /