Subject: Require suggestions on feature 6794

From: Pravesh Sharma <[email-masked]>
Date: Tue, 26 Nov 2024 16:25:26 +0530

Hi Dave/Team

I have started working on feature #6794
<https://github.com/pgadmin-org/pgadmin4/issues/6794>. The user wants to
pass connection information, such as host, port, and username, to the
passexec command without hardcoding these values. I plan to implement it as
follows: The user will set environment variables for the host, port, and
username, and before running the passexec command, we will replace the
corresponding values with the environment variables.

Please share your suggestions or feedback on the approach I am proposing.

Thanks,

Pravesh

-- 

Pravesh Sharma

Senior SDE

+91 9406461406

enterprisedb.com

---

From: Dave Page <[email-masked]>
Date: Tue, 26 Nov 2024 11:24:09 +0000

Hi

> Please share your suggestions or feedback on the approach I am proposing.

I'm not sure why the user would need to set environment variables -
wouldn't pgAdmin just set them in the environment of the passexec
process, based on the server definition?

-- 
Dave Page
pgAdmin: https://www.pgadmin.org
PostgreSQL: https://www.postgresql.org
pgEdge: https://www.pgedge.com

---

From: Aditya Toshniwal <[email-masked]>
Date: Tue, 26 Nov 2024 16:59:47 +0530

Hi Pravesh,

In addition to that, why do we need env vars at all? We can simply pass
them as arguments to passexec script. It's up to the users to use it or
ignore it.

-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Staff SDE II | *enterprisedb.com*
<https://www.enterprisedb.com/>
"Don't Complain about Heat, Plant a TREE"

---

From: Dave Page <[email-masked]>
Date: Tue, 26 Nov 2024 11:33:56 +0000

> them as arguments to passexec script. It's up to the users to use it or

Or do some string substitution in the command, e.g.

/path/to/passexec.sh $HOST$ $PORT$

or similar, so the user has even more flexibility. I know that is done in
PEM in a few places, possibly in pgAdmin too, though I don't recall offhand
(if it is, we should be consistent on how the parameters are notated).