diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-06-07 13:18:37 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-06-07 13:18:37 +0000 |
commit | ca9d50304ff664ec2fbf6ddf4cafe3d031c319cb (patch) | |
tree | be57b8553f4854beaadd96df1a9d50ea97047b20 /src | |
parent | 9c351695dcb7ebeafdc9166ba7a928f18772689d (diff) | |
download | postgresql-ca9d50304ff664ec2fbf6ddf4cafe3d031c319cb.tar.gz postgresql-ca9d50304ff664ec2fbf6ddf4cafe3d031c319cb.zip |
For psql multi-line history, save backslash commands right away, rather
than only if there is already history.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/mainloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index d7f17f4b6ae..6c02ba1ccae 100644 --- 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); |