Re: psql and readline
От | Ross J. Reedstrom |
---|---|
Тема | Re: psql and readline |
Дата | |
Msg-id | 20030110074905.GA2820@wallace.ece.rice.edu обсуждение исходный текст |
Ответ на | Re: psql and readline (Peter Mount <peter@retep.org.uk>) |
Ответы |
Re: psql and readline
Re: psql and readline |
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: