Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAah6-0003ox-CU for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 13:08:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAah3-0001X0-Eb for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 13:07:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAah3-0001Ws-78 for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 13:07:57 +0000 Received: from mail.sieb-meyer.de ([213.252.170.194]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAagz-0004bR-L2 for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 13:07:56 +0000 Received: from smexchange.siebmeyer.org (172.16.1.201) by smexchange.siebmeyer.org (172.16.1.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1034.26; Thu, 11 Oct 2018 15:07:51 +0200 Received: from smexchange.siebmeyer.org ([fe80::703c:132:1215:2382]) by smexchange.siebmeyer.org ([fe80::703c:132:1215:2382%4]) with mapi id 15.01.1034.026; Thu, 11 Oct 2018 15:07:51 +0200 From: "Schenk, Hendrik" To: "pgsql-admin@lists.postgresql.org" Subject: Batch: DB password with ">" Thread-Topic: Batch: DB password with ">" Thread-Index: AdRhYmHufDUTs2b4Q8KrtSv8eBh2Sg== Date: Thu, 11 Oct 2018 13:07:51 +0000 Message-ID: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.20.95] x-kse-serverinfo: smexchange.siebmeyer.org, 9 x-kse-attachmentfiltering-interceptor-info: protection disabled x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: Clean, bases: 11.10.2018 11:04:00 Content-Type: multipart/alternative; boundary="_000_5a251002104944a2955bdf4dbaea3a42siebmeyerde_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_5a251002104944a2955bdf4dbaea3a42siebmeyerde_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, i want to modiy the adatabse via batch script. The user has a password that= contains symbols like that "g>uAks!". The problem here is the "greater tha= n"-symbol. call set PGPASSFILE=3D%TEMP%\pgpass.conf echo localhost:5432:postgres:postgres:7Ug^>uAks!{VA > %PGPASSFILE% "C:\Program Files\PostgreSQL\10\bin\psql" -U postgres psql will always fail with FATAL: User-Athentification failed. The password= was read from ..\Local\Temp\pgpass.conf If I set a Enviromentvariable and "echo" it, it will not work, because of t= he >-symbol. C:\Users\hschenk>set PGPASSWORD=3Dlalal>lala C:\Users\hschenk>echo %PGPASSWORD% Lalal How can I use this with a password like this? --_000_5a251002104944a2955bdf4dbaea3a42siebmeyerde_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

i want to modiy the adatabse vi= a batch script. The user has a password that contains symbols like that = 220;g>uAks!”. The problem here is the “greater than”-s= ymbol.

 

call set PGPASSFILE=3D%TEMP%= \pgpass.conf

echo localhost:5432:postgres= :postgres:7Ug^>uAks!{VA > %PGPASSFILE%

 =

"C:\Program Files\Postg= reSQL\10\bin\psql" -U postgres

 =

psql will always fail with FATA= L: User-Athentification failed. The password was read from ..\Local\Temp\pg= pass.conf

 

 

 

 

If I set a Enviromentvariable a= nd “echo” it, it will not work, because of the >-symbol.

 

 

C:\Users\hschenk>set PGPA= SSWORD=3Dlalal>lala

 =

C:\Users\hschenk>echo %PGPASSWORD%<= /i>

Lalal<= /p>

 =

How can I use this with a passw= ord like this?

--_000_5a251002104944a2955bdf4dbaea3a42siebmeyerde_--