In current sources:
regression=# create table tt1 (i2 int2, i4 int4, f8 float8,
regression(# \r
Query buffer reset (cleared).
regression(# select 2;
regression(# -- nothing happens because psql still wants a right paren
Not sure if there is any other state that needs to be reset along
with the paren counter.
regards, tom lane