We do this
nohup psql -U (username) -W -f (sqlquery script) (database) &&
on our linux boxes all the time to run a long query or sequence of them. If its a scheduled job it just goes into cron and you don't need the "nohup" or trailing "&&". Let me know if you'd like me to break all that apart for you.
Tim Clarke
On 07/05/15 02:15, Melvin Davidson wrote:
Although not a PostgreSQL utility, in Linux, you can use screen or tmux to establish a connection and then disconnect.