From af00c04c42a1f9da25946f001d60941e43801285 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 21 Mar 2006 13:38:12 +0000 Subject: Fix psql history handling: > 1) Fix the problems with the \s command. > When the saveHistory is executed by the \s command we must not do the > conversion \n -> \x01 (per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00317.php ) > > 2) Fix the handling of Ctrl+C > > Now when you do > wsdb=# select 'your long query here ' > wsdb-# > and press afterwards the CtrlC the line "select 'your long query here '" > will be in the history > > (partly per > http://archives.postgresql.org/pgsql-hackers/2006-03/msg00297.php ) > > 3) Fix the handling of commands with not closed brackets, quotes, double > quotes. (now those commands are not splitted in parts...) > > 4) Fix the behaviour when SINGLELINE mode is used. (before it was almost > broken ;( Sergey E. Koposov --- src/bin/psql/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin/psql/command.c') diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index de9cd976ea9..63639e6d9a8 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.164 2006/03/05 15:58:51 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.165 2006/03/21 13:38:11 momjian Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -753,7 +753,7 @@ exec_command(const char *cmd, expand_tilde(&fname); /* This scrolls off the screen when using /dev/tty */ - success = saveHistory(fname ? fname : DEVTTY); + success = saveHistory(fname ? fname : DEVTTY, false); if (success && !quiet && fname) printf(gettext("Wrote history to file \"%s/%s\".\n"), pset.dirname ? pset.dirname : ".", fname); -- cgit v1.2.3