bug_fix_for_ev_command.patch

text/x-diff

Filename: bug_fix_for_ev_command.patch
Type: text/x-diff
Part: 0
Message: Bug fix for psql's meta-command \ev

Patch

Format: unified
File+
src/bin/psql/command.c 2 0
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index bcd8eb3538..a853bce096 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -1238,6 +1238,8 @@ exec_command_ef_ev(PsqlScanState scan_state, bool active_branch,
 			else
 				status = PSQL_CMD_NEWEDIT;
 		}
+		else
+			resetPQExpBuffer(query_buf);
 
 		free(obj_desc);
 	}