Quote from current Postgres manual
\watch [ seconds ]
Repeatedly execute the current query buffer (as \g
does) until interrupted or the query fails. Wait the specified number
of seconds (default 2) between executions. Each query result is
displayed with a header that includes the \pset title string (if any),
the time as of query start, and the delay interval.
Is there some similar functionality for MariaDB or MySQL?
For example this statement I wish to repeat every 2 seconds. In Linux it's the watch
command
NAME
watch - execute a program periodically, showing output fullscreen
run statement till state changes.
SELECT * FROM TABLE WHERE state = retry
Best Answer
Not quite what you want, but this shell command might suffice: