When used PostgreSQL 9.6.* it was common use in psql \r\e to clear a buffer query and open the empty text editor. Works fine for me and it was very useful in my tasks.
Since PostgreSQL 10, this behavior changed and not more clear the buffer query.
psql helps show that \r reset (clear) the query buffer but in practice don't work or I do not understand how would work.
Example using postgrsql 11.8 :
select 1;
\e
-> Open temp file with a last statement "select 1;"
exit text editor and run command. It's ok.
\r
\e
-> Open temp file with the same last command "select 1;"