Thread: Running an SQL command that works after detaching from my SSH tunnel?

Running an SQL command that works after detaching from my SSH tunnel?

From
Jacek Wielemborek
Date:
Hello,

I asked the following question on dba.stackexchange.com:

http://dba.stackexchange.com/q/103987/33815

So far the only sensible options that I found involved using VNC or
Xpra, which I'm currently testing. Are there any other ways?

Cheers,
d33tah


Attachment

Re: Running an SQL command that works after detaching from my SSH tunnel?

From
"J.F. Oster"
Date:
Hello Jacek,

Anyway, you'll want to make queries run by client on the remote site
(on database host itself or another long-running machine with stable
connection).

Regarding pgAdmin running on your machine, there isn't much you can
do with it.
You can create pgAgent jobs for long running queries, but that seems
inconvenient...
Also I have a patch (not accepted yet) that allows running external
command from Query window with sql query passed to stdin. It's
intended for text formatting utility, but theoretically it can be a
batch script that opens ssh to your db host, creates .sql file there,
runs psql and detaches.
Oh, Idea! You can achieve this magic today by using something like
AutoHotKey (ahkscript.org) on your client side. Surely, it can capture
text in the clipboard to a file and run any script on it.

Please share the decision if you make it :)
Good luck!

Friday, July 24, 2015, 2:04:33 PM, you wrote:

JW> Hello,

JW> I asked the following question on dba.stackexchange.com:

JW> http://dba.stackexchange.com/q/103987/33815

JW> So far the only sensible options that I found involved using VNC or
JW> Xpra, which I'm currently testing. Are there any other ways?

JW> Cheers,
JW> d33tah




--
Best regards,
 J.F.