Make psql redisplay the query buffer after \e.
Up to now, whatever you'd edited was put back into the query buffer but not redisplayed, which is less than user-friendly. But we can improve that just by printing the text along with a prompt, if we enforce that the editing result ends with a newline (which it typically would anyway). You then continue typing more lines if you want, or you can type ";" or do \g or \r or another \e. This is intentionally divorced from readline's processing, for simplicity and so that it works the same with or without readline enabled. We discussed possibly integrating things more closely with readline; but that seems difficult, uncertainly portable across different readline and libedit versions, and of limited real benefit anyway. Let's try the simple way and see if it's good enough. Patch by me, thanks to Fabien Coelho and Laurenz Albe for review Discussion: https://postgr.es/m/13192.1572318028@sss.pgh.pa.us
Showing
Please register or sign in to comment