Sometimes you want to repeat a query constantly to see updated data, here is a way to do it on the postgresql shell
# Execute query
SELECT count(*) FROM table;
# Tell postgres to repeat it every X seconds
\watch 5
And that’s it!
Sometimes you want to repeat a query constantly to see updated data, here is a way to do it on the postgresql shell
# Execute query
SELECT count(*) FROM table;
# Tell postgres to repeat it every X seconds
\watch 5
And that’s it!