Re: psql and readline

From: Jean-Paul ARGUDO <jean-paul(dot)argudo(at)wanadoo(dot)fr>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql and readline
Date: 2003-01-09 19:21:14
Message-ID: 1042140075.480.6.camel@amelie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2003-01-08 at 15:30, 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...

You could use ledit, piped with psql works great. I use it with sqlplus
from Oracle too, adds me readline functions sqlplus doesnt have:

Under Debian GNU/Linux:

$ apt-cache search ledit
ledit - A line editor for interactive programs.

It has some OpenCAML dependencies, beware.

After:

$ ledit | psql yourdatabase

...my 2 cents

--
Jean-Paul ARGUDO
DBA PostgreSQL, MySQL, Oracle, Ingres
Membre de l'April http://www.april.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-09 20:58:53 Re: Execute command type
Previous Message Peter Eisentraut 2003-01-09 19:19:39 Execute command type