Re: Bug fix for psql's meta-command \ev
Ryoga Yoshida <bt23yoshidar@oss.nttdata.com>
From: Ryoga Yoshida <bt23yoshidar@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Aleksander Alekseev <aleksander@timescale.com>,
pgsql-hackers@lists.postgresql.org, Kyotaro Horiguchi
<horikyota.ntt@gmail.com>
Date: 2023-09-20T05:08:34Z
Lists: pgsql-hackers
On 2023-09-20 09:32, Michael Paquier wrote: > Actually there was a bit more to it in the presence of \e, that could > also get some unpredictible behaviors if some errors happen while > editing a query, which is something unlikely, still leads to strange > behaviors on failure injections. I was considering first to move the > reset in do_edit(), but also we have the case of \e[v|f] where the > buffer has no edits so it felt a bit more natural to do that in the > upper layer like in this patch. Indeed, similar behaviours can happen with the \e. The patch you committed looks good to me. Thank you. Ryoga Yoshida
Commits
-
psql: Reset query buffer of \e, \ef and \ev on error
- cb943054f3f6 17.0 landed