Re: hardcode password in connect string - Mailing list pgsql-general

From James Keener
Subject Re: hardcode password in connect string
Date
Msg-id CC538BE6-170C-46C8-B79D-93BADDA8E3CB@jimkeener.com
Whole thread Raw
In response to hardcode password in connect string  (David Gauthier <davegauthierpg@gmail.com>)
Responses Re: hardcode password in connect string
Re: hardcode password in connect string
List pgsql-general
Is setting it as an environment variable an option? https://www.postgresql.org/docs/9.1/static/libpq-envars.html

Alternatively, a service file? https://www.postgresql.org/docs/9.0/static/libpq-pgservice.html

Jim

On April 13, 2018 2:43:01 PM EDT, David Gauthier <davegauthierpg@gmail.com> wrote:
Hi:

PG v9.5.2 on RHEL

I like to use an alias to connect to my favorite DBs but don't like to enter passwords.  I used to just disable passwords (working behind a firewall), but this one is different.  I see nothing in the interactive connect string where I can enter the password...

psql -h thehost -U memyselfi mydb

Missing something like "-p mypassword"

Is there a way I can stick the pw in the linux alias definition ?

Just thinking something like this may be available since hardcoded passwords are supported in perl/dbi, pg driver

Thanks !

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

pgsql-general by date:

Previous
From: David Gauthier
Date:
Subject: hardcode password in connect string
Next
From: Rob Sargent
Date:
Subject: Re: hardcode password in connect string