diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-06-11 23:06:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-06-11 23:06:00 +0000 |
commit | e2e2a9db4c6581b3839fc8139f7d33c6770316b9 (patch) | |
tree | 8e198c5a38b33af3a9898a9a0117f83cd35dbd3e /src/bin/psql/command.c | |
parent | bf64a37909cd25e2e14c47de922a51d205795d17 (diff) |
Code review for psql multiline history patch(es). Fix memory leak,
failure to enter commands in history if canceled by control-C, other
infelicities.
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r-- | src/bin/psql/command.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 3c5bd6740f1..a9d8a07f835 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.169 2006/06/07 22:24:45 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.170 2006/06/11 23:06:00 tgl Exp $ */ #include "postgres_fe.h" #include "command.h" @@ -1361,7 +1361,7 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf) } else { - /* read file back in */ + /* read file back into query_buf */ char line[1024]; resetPQExpBuffer(query_buf); @@ -1374,14 +1374,6 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf) error = true; } -#ifdef USE_READLINE -#ifdef HAVE_REPLACE_HISTORY_ENTRY - - replace_history_entry(where_history(), query_buf->data, NULL); -#else - add_history(query_buf->data); -#endif -#endif fclose(stream); } |