Postgres PSM connection using PSQL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Postgres PSM connection using PSQL

L1 Bithead

Has anyone been able to develop a connection component for psql (postgres)?

 

Since postgres will not allow you to passa password parameter through a command line switch I am stuck. Client insists on having the CLI as a connection opion.

 

I've been trying to figure it out in AutoIT but frankly I suck at AutoIT

 

My connection string is below however this just prompts for the password.

 

Any and all help is desperately needed

"D:\v4\runtime\psql.exe" -U "{UserName}" -p "{Port}" -h "{PSMRemoteMachine}" -d "{Database}"

 

3 REPLIES 3

L5 Sessionator

Are you able to manually connect via CMD from PSM Server? If yes, what is Command Line command are you using for that?

L1 Bithead

Yes we can manually connect from the CPM, using the following string, but it pauses and waits for a manual response to the password prompt

"D:\v4\runtime\psql.exe" -U "{UserName}" -p "{Port}" -h "{PSMRemoteMachine}" -d "{Database}"

It's automating the password response which is throwing me for a loop.

Hi,

 

here the command you need to automate the password

 

"D:\v4\runtime\psql.exe" "postgresql://$TargetUsername:$TargetPassword@$TargetAddress/$TargetDatabase"

  • 2705 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!