public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin][RM5739]: Export feature(COPY) does not work with SSH tunnel
Date: Mon, 21 Sep 2020 16:17:52 +0530
Message-ID: <CAJ9T6Sutd_izqbd3=vmk8624PFnygHwYOYJziD5O8ngsv8j5Wg@mail.gmail.com> (raw)
Hi Hackers,
Export feature does not work with the SSH tunnel. Attached is the patch to
fix the issue.
--
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM5739.patch (816B, 3-RM5739.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/import_export/__init__.py b/web/pgadmin/tools/import_export/__init__.py
index 878fb1636..7ca7547e8 100644
--- a/web/pgadmin/tools/import_export/__init__.py
+++ b/web/pgadmin/tools/import_export/__init__.py
@@ -342,8 +342,12 @@ def create_import_export_job(sid):
manager.export_password_env(p.id)
env = dict()
- env['PGHOST'] = server.host
- env['PGPORT'] = str(server.port)
+
+ env['PGHOST'] = \
+ manager.local_bind_host if manager.use_ssh_tunnel else server.host
+ env['PGPORT'] = \
+ str(manager.local_bind_port) if manager.use_ssh_tunnel else str(
+ server.port)
env['PGUSER'] = server.username
env['PGDATABASE'] = data['database']
p.set_env_variables(server, env=env)
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin][RM5739]: Export feature(COPY) does not work with SSH tunnel
In-Reply-To: <CAJ9T6Sutd_izqbd3=vmk8624PFnygHwYOYJziD5O8ngsv8j5Wg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox