Skip to content

Commit ca9d503

Browse files
committed
For psql multi-line history, save backslash commands right away, rather
than only if there is already history.
1 parent 9c35169 commit ca9d503

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/mainloop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.77 2006/06/05 14:47:38 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.78 2006/06/07 13:18:37 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "mainloop.h"
@@ -309,7 +309,7 @@ MainLoop(FILE *source)
309309
if (!line_saved_in_history && pset.cur_cmd_interactive)
310310
{
311311
/* Sending a command (PSQL_CMD_SEND) zeros the length */
312-
if (scan_result == PSCAN_BACKSLASH && history_buf->len != 0)
312+
if (scan_result == PSCAN_BACKSLASH)
313313
pg_write_history(line);
314314
else
315315
pg_append_history(line, history_buf);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy