Skip to content

Commit a837851

Browse files
committed
Fix psql so \r is separate in the history, rather than at the end of
the query.
1 parent f6dc20e commit a837851

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.74 2006/03/21 13:38:12 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/mainloop.c,v 1.75 2006/06/04 04:35:55 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "mainloop.h"
@@ -306,7 +306,7 @@ MainLoop(FILE *source)
306306
if (first_query_scan && pset.cur_cmd_interactive)
307307
{
308308
/* Sending a command (PSQL_CMD_SEND) zeros the length */
309-
if (scan_result == PSCAN_BACKSLASH && query_buf->len != 0)
309+
if (scan_result == PSCAN_BACKSLASH && history_buf->len != 0)
310310
pg_write_history(line);
311311
else
312312
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