On Thursday, November 16, 2017, Tom Lane <
tgl@sss.pgh.pa.us> wrote:
xyh@nvn.xyz writes:
> Hello,
> In PostgreSQL 10.0 and 10.1 .
> psql \r is invalid.
Please say why you think this is "invalid". I'm pretty sure
it was an intentional behavioral change (associated with the
rewrite to support \if). In any case it's not obviously worse
than before. \r is supposed to clear the current query input
string; it says nothing about deleting history.
Actually, \r is behaving the same. The behavior of \p has been changed (at least per the docs) to print the last executed query if the current buffer is empty. This behavior change doesn't seem to be in the release notes.
David J.