I executed a long-running Postgres query in the psql
terminal. It displayed the result, but I pressed q
too soon, exiting out of the result and back to the prompt.
Is there any way for me to see the result again without rerunning the query?
I executed a long-running Postgres query in the psql
terminal. It displayed the result, but I pressed q
too soon, exiting out of the result and back to the prompt.
Is there any way for me to see the result again without rerunning the query?
You've lost that output. Though the query is likely fairly "hot" atm as it was just requested (by you).
In the future though you can use the \o [filename]
syntax of psql
to save the output of the command locally, such that you don't run into this issue again.