Subject: How to use password in psql command line?

From: Shaozhong SHI <[email-masked]>
Date: Thu, 28 Apr 2022 10:10:59 +0100

Running lots of postgres commands in parallel | Mark's blog
(markandruth.co.uk)
<https://markandruth.co.uk/2016/05/26/running-lots-of-postgres-commands-in-parallel>

How can make this work by providing password in this command line?

Regards,

David

---

From: Karsten Hilbert <[email-masked]>
Date: Thu, 28 Apr 2022 11:38:10 +0200

> Running lots of postgres commands in parallel | Mark's blog (markandruth.co.uk)[https://markandruth.co.uk/2016/05/26/running-lots-of-postgres-commands-in-parallel]
> 

Your first option could be to read the manual.

Karsten

---

From: Samed YILDIRIM <[email-masked]>
Date: Fri, 29 Apr 2022 10:18:44 +0300

Hi David,

There are two options;

Password file -> https://www.postgresql.org/docs/current/libpq-pgpass.html

PGPASSWORD environmental variable -> https://www.postgresql.org/docs/14/libpq-envars.html

Best regards.

Samed YILDIRIM

28.04.2022, 12:11, "Shaozhong SHI" <[email-masked]>:

Running lots of postgres commands in parallel | Mark's blog (markandruth.co.uk)

Regards,

David