Re: Getting psql to redisplay command after \e - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: Getting psql to redisplay command after \e
Date
Msg-id alpine.DEB.2.21.1910290915230.10013@lancre
Whole thread Raw
In response to Getting psql to redisplay command after \e  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting psql to redisplay command after \e
List pgsql-hackers
Hello Tom,

> The attached patch teaches psql to redisplay any not-yet-executed
> query text after editing with \e. 
>
> [...]

I've tested this patch. Although I agree that it is an improvement, I'm a 
little at odd with the feature as is:

   psql=> \e
   # select 1...

then:

   psql=> select 1...
   psql-> <prompt>

I cannot move back with readline to edit further, I'm stuck there, which 
is strange. I would prefer a simpler:

   psql=> select 1...<prompt>

that would also be readline-aware, so that I know I'm there and ready to 
nl but also to edit directly if I want that.

That would suggest to remove the ending newline rather than appending it, 
and possibly to discuss a little bit with readline as well so that the 
display line is also the current line for its point of view, so that it 
can be edited further?

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Block level parallel vacuum