Can we do something like
\echo 'Type username to show its properties';
SELECT * FROM mY_users WHERE username = ?;
\echo 'End of script';
in a psql script file ?
The system would wait until we enter something then echo the 'End of script' string.