pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
password error in batch script 3+ messages / 3 participants [nested] [flat]
* password error in batch script @ 2023-07-27 20:17 Atul Kumar <akumar14871@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Atul Kumar @ 2023-07-27 20:17 UTC (permalink / raw) To: pgsql-general <pgsql-general@lists.postgresql.org> 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" Could you please help me in getting this password read by command prompt in the batch file. Regards. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: password error in batch script @ 2023-07-27 21:45 Adrian Klaver <adrian.klaver@aklaver.com> parent: Atul Kumar <akumar14871@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Adrian Klaver @ 2023-07-27 21:45 UTC (permalink / raw) To: Atul Kumar <akumar14871@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org> 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: password error in batch script @ 2023-07-28 14:12 Ron <ronljohnsonjr@gmail.com> parent: Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 0 replies; 3+ messages in thread From: Ron @ 2023-07-28 14:12 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org On 7/27/23 16:45, Adrian Klaver wrote: > 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" Also, the first double quote seems to be in the wrong position. This is the canonical way to define a string: 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. > > -- Born in Arizona, moved to Babylonia. ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2023-07-28 14:12 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-07-27 20:17 password error in batch script Atul Kumar <akumar14871@gmail.com> 2023-07-27 21:45 ` Adrian Klaver <adrian.klaver@aklaver.com> 2023-07-28 14:12 ` Ron <ronljohnsonjr@gmail.com>
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