Hello Is psql command \r actually works? I expected \r and then \e command should start editor without text of last query.
LANG=C EDITOR=cat psql psql (11.5 (Debian 11.5-1.pgdg100+1)) Type "help" for help. melkij=> select 1; ?column? ---------- 1 (1 row) melkij=> \r Query buffer reset (cleared). melkij=> \e select 1; ?column? ---------- 1 (1 row) Buffer is still here, in normal external editors too. Same test on REL9_6_STABLE: postgres=# select 1; ?column? ---------- 1 (1 row) postgres=# \r Query buffer reset (cleared). postgres=# \e Buffer was actually cleared. I see this behavior change on >= 10 versions regards, Sergei