Skip to content

Commit 6d8b8a5

Browse files
committed
[ Have readline save edit history.]
> > > I already posted a one-line patch to implement this, but it doesn't > > seem to hve come through to the list. Here it is inline, instead of as > > an attachment: > > We need this to work without readline as well. (Of course there won't be > any history, but it needs to compile.) <blush> Even after slogging my way through the nesting #ifdefs for readline and win32, I forgot! Let's make that a three line patch, then. Ross J. Reedstrom
1 parent 68c67fc commit 6d8b8a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bin/psql/command.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.88 2003/01/10 21:57:44 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.89 2003/02/13 04:08:16 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "command.h"
@@ -1648,6 +1648,9 @@ do_edit(const char *filename_arg, PQExpBuffer query_buf)
16481648
error = true;
16491649
}
16501650

1651+
#ifdef USE_READLINE
1652+
replace_history_entry(where_history(),query_buf->data,NULL);
1653+
#endif
16511654
fclose(stream);
16521655
}
16531656

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