From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Atul Kumar <akumar14871@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: password error in batch script
Date: Thu, 27 Jul 2023 14:45:48 -0700
Message-ID: <d70dc834-0b13-df73-88ae-540a507a348c@aklaver.com> (raw)
In-Reply-To: <CA+ONtZ4FXvvYr0uj4eaQNmaRMV+QE-j0sMpkDAwt1nwfMVkeQQ@mail.gmail.com>
References: <CA+ONtZ4FXvvYr0uj4eaQNmaRMV+QE-j0sMpkDAwt1nwfMVkeQQ@mail.gmail.com>
On 7/27/23 1:17 PM, Atul Kumar wrote:
> Hi,
>
> I have a password Vl=SO*CIz%A83FQF that is working fine like that in the
> command prompt but when it is being used in a batch file it is giving me
> an error of wrong password, the password is something looks like that in
> batch script.
>
> set "PGPASSWORD=Vl=SO*CIz%A83FQF"
More information needed.
1) What sort of batch script; shell, Python, etc?
2) OS and version.
3) What is set pointing at?
4) PGPASSWORD is an environment variable per:
https://www.postgresql.org/docs/15/libpq-envars.html
So I would expect export PGPASSWORD = .
5) Why not use pgpass?:
https://www.postgresql.org/docs/current/libpq-pgpass.html>
> Could you please help me in getting this password read by command prompt
> in the batch file.
>
>
>
> Regards.
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, akumar14871@gmail.com
Subject: Re: password error in batch script
In-Reply-To: <d70dc834-0b13-df73-88ae-540a507a348c@aklaver.com>
References: <CA+ONtZ4FXvvYr0uj4eaQNmaRMV+QE-j0sMpkDAwt1nwfMVkeQQ@mail.gmail.com> <d70dc834-0b13-df73-88ae-540a507a348c@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox