Re: psql and readline

From: "Dan Langille" <dan(at)langille(dot)org>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and readline
Date: 2003-01-09 14:33:21
Message-ID: 3E1D41E1.1992.FDF9BBD@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9 Jan 2003 at 9:15, Robert Treat wrote:

> On Thu, 2003-01-09 at 08:45, Peter Mount wrote:
> > On Wed, 8 Jan 2003, Dan Langille wrote:
> > > On 8 Jan 2003 at 12:28, Bruce Momjian wrote:
> > > > Tom Lane wrote:
> > > > > "Alexander M. Pravking" <fduch(at)antar(dot)bryansk(dot)ru> writes:
> > > > > > On Wed, Jan 08, 2003 at 10:53:51AM +0100, Ian Barwick wrote:
> > > > > >> On Wednesday 08 January 2003 07:55, Christopher Kings-Lynne
> > > > > >> wrote:
> > > > > >>> Is there any way of making the 'up' arrow retrieve all of
> > > > > >>> the last multiline query, instead of just the last line?
> > > > > >>> It's really annoying working with large multiline queries
> > > > > >>> at the moment...
> > > > > >>
> > > > > >> Not that I know of, but you can use \e to edit the query in
> > > > > >> your favourite editor.
> > > > >
> > > > > > Sure. But \e puts "\e" into history, instead of the query
> > > > > > itself :(
> > > > >
> > > > > Hm, so it does. It seems like the edited query should go into
> > > > > history, at least when you execute it. Peter, is this
> > > > > fixable?
> > > >
> > > > Wow, that would be a nifty trick, though they really did type \e
> > > > and not the query the pulled in from the editor.
> > >
> > > What about those of us who want to use \e repeatedly? Will that
> > > be in the history buffer?
> >
> > The number of times I've cursed things over the years, I would have
> > thought having the edited query in the history would be more useful
> > than \e - the latter is only three key presses any how ;-)
> >
>
> Or if the query could be appended after the \e, it would only be a
> quick "double-up" to get back to the \e.

As this is changing existing behaviour, I think adding an optional
switch to revert to the old behaviour is a good idea.
--
Dan Langille : http://www.langille.org/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Liu 2003-01-09 14:39:33 clock sync
Previous Message Robert Treat 2003-01-09 14:15:34 Re: psql and readline