Hello,
I usually use this approach:
PGPASSWORD=secret psql -h 127.0.0.1 -p 5432 -U joao mydatabase
it has the down side that the password is shown in the command. need to be careful about that aspect
On Thu, Apr 28, 2022 at 10:33 AM Shaozhong SHI <shishaozhong@xxxxxxxxx> wrote:
I tried various ways to set password in psql command line, but got no luck.Can anyone help?Regards,David