On Fri, Jan 10, 2003 at 07:15:34AM +0000, Peter Mount wrote: > On Thu, 9 Jan 2003, Peter Eisentraut wrote: > > > Tom Lane writes: > > > > > The case I find interesting is where you're using plain "\e" to > > > re-edit a query interactively. If this query never gets into the > > > history buffer then you're lost: you won't be able to pull it back > > > for re-editing a second time. > > > > If you call \e again immediately then you edit the previous command. > > Yes, but it's not always the last command you want :-(
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: Index: src/bin/psql/command.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v retrieving revision 1.84 diff -u -r1.84 command.c --- src/bin/psql/command.c 2002/10/23 19:23:56 1.84 +++ src/bin/psql/command.c 2003/01/09 22:18:49 @@ -1639,6 +1639,7 @@ error = true; } + replace_history_entry(where_history(),query_buf->data,NULL); fclose(stream); } ---------------------------------------------------------------- Ross ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly