From hendrik.schenk@sieb-meyer.de Thu Oct 11 13:07:51 2018 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_-- From david.g.johnston@gmail.com Thu Oct 11 13:45:14 2018 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 1gAbHM-0005a6-Rs for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 13:45:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAbHK-0000X9-8l for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 13:45:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAbHJ-0000X1-Rl for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 13:45:26 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAbH9-0004mh-RA for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 13:45:24 +0000 Received: by mail-qk1-x743.google.com with SMTP id m8-v6so5421436qka.12 for ; Thu, 11 Oct 2018 06:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=L0WrxLdh6wq5Q9hSRZNeKhmb8dIcBqybB+Mb8vqtWRk=; b=fwuqK8/MDA9zDxMyotRioAIWt0NzZSW3BoBZcUn/6PdrcTetx5g/W87G3z3lmBfL8e st+7JgNO74kfnpAT3PyZFV3kcK2zD+AmBOlp1kVWcTPiLlOUbiOEYHLhzoy763E2fG0d d8XTNh9cfY9SvXfknK8WkwyoP+71rIzfmxWwzrxAzxCOFhxzMBYIsvvnTb5s/SIzTQ45 fbc+VeqcFHryqE5lp8yi1qDYkBl9PV3N+fhZxJP94eHnHiYcvr2uinopfKSWpep+TKas rHlXA2X75+afQrxLP9d3iOkpEddW4FHYU42Bu8UCXT6zb8Hf18qQj6ik+XYgZNhi5cNG 179g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=L0WrxLdh6wq5Q9hSRZNeKhmb8dIcBqybB+Mb8vqtWRk=; b=SzZXs17/hJLGAtLn8DiKBo5megYwU2SEyz4TPNbGjZ/Lmi+tQXZyIKtIRVPPMcIe5J yP315xhVwyiMIRUm2V8ovZHMl+OLvsvnQByJbaFoz+xcqdhxLqVvQFB+LpXW7OgqoIAJ xdqobnRz8sNQrVNU9r/QAGd+rlklbc4+IWYAcBiBpfS0NDgTSbKBkVTJ7xd5SQA1dh1E 79+oRMNxZGwwW0NWw9NU1q0+FpUzob77/OiQSg6/yxn89U4DSRLegmP2wshLLa0XLY8Y qjzQASHEDHkv7X5fW+ZcVug7oNjihoHIJwudZxiTaiIP/Oh4k/BREuJcfG1PlEkSBj/2 9Saw== X-Gm-Message-State: ABuFfojrHNbZztKbtMtvHOsomtJVPHgVBqHPc/Xh9vT9NoQsAb06m7lk JaRnvEpV3ugdW0tFfqIVZxmnWMMiNh6Ennk94tg= X-Google-Smtp-Source: ACcGV62BxMeJtgVshB2mJ0pcH/MUAM5Cz3C4rtovSGJBWGyu6hhuIu1/jGpB3/21KO4XVqRrbOqrALP4tppwLLEnxjs= X-Received: by 2002:a37:d86:: with SMTP id 128-v6mr1501787qkn.11.1539265515010; Thu, 11 Oct 2018 06:45:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:b50b:0:0:0:0:0 with HTTP; Thu, 11 Oct 2018 06:45:14 -0700 (PDT) In-Reply-To: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> References: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> From: "David G. Johnston" Date: Thu, 11 Oct 2018 06:45:14 -0700 Message-ID: Subject: Re: Batch: DB password with ">" To: "Schenk, Hendrik" Cc: "pgsql-admin@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000003cbdcc0577f42e22" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000003cbdcc0577f42e22 Content-Type: text/plain; charset="UTF-8" On Thursday, October 11, 2018, Schenk, Hendrik wrote: > > How can I use this with a password like this? > > Maybe use single quotes to prevent the shell from seeing its special symbol? David J. --0000000000003cbdcc0577f42e22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thursday, October 11, 2018, Schenk, Hendrik <hendrik.schenk@sieb-meyer.de> wrote:=C2=A0

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


Maybe use single quotes to prevent the = shell from seeing its special symbol?

David J.=C2= =A0
--0000000000003cbdcc0577f42e22-- From jayknowsunix@gmail.com Thu Oct 11 14:21:01 2018 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 1gAbpw-0007Kq-EQ for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 14:21:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAbpt-0007Wt-HG for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 14:21:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAbpt-0007WS-48 for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 14:21:09 +0000 Received: from mail-yb1-xb34.google.com ([2607:f8b0:4864:20::b34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAbpo-0005gN-64 for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 14:21:07 +0000 Received: by mail-yb1-xb34.google.com with SMTP id 184-v6so3669164ybg.1 for ; Thu, 11 Oct 2018 07:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aC6ZiScsEFFDEsmeCe4UhXpL4fpoEGt+sxV4IqWLoLk=; b=YP8o4AxZY357OlsfJ2lwerwka4D0t65/o3TLhXVNLxC1xlERFq/EdTbbq8ifzfijoW SC28wFdpTkIsLhMc64olJI+SexpMjuFCudkhGzcifMsKAF+m3vMCM8Nvyors/Korwivo 8F48E+mcE3UQ34l2B+m5tOP68fgrdHDKvslNko39bQC6keIlBcJU5XtjPLqmM31UCCJi tXk9eBCaTfN+S7BtJjdcW1OvbnTHPwwbJsDz0H2IQg2vMMLozf32K94HesqeanWRUnMT RSULBWjK3BWXttdcon9Q/ZSGxNvwaJVwl2dPDjQnLSh8Y++5FACUec/h5F8SpKIkG2I+ Cf2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aC6ZiScsEFFDEsmeCe4UhXpL4fpoEGt+sxV4IqWLoLk=; b=irhwi28A54JcUD0VTfz3tRHSf2uPJXzeWqnnomfCDGGIBjuCjKcT1U+GEFaeiSk0P8 6kWcor1/c1kV6WjDb72HhB2FpXoQzU05LK1MIBmP/dS/cgqaqZOk0XCdGcqk/eHp/sHq 4A2UVC6dFoF1WZvRncbUiswJeZedDMZVClC/7cWotOCRfilQqObzVDQA0mklkOE8rVTH ytwRhmY1wU0IyoNpooBawkdbrWWz/fuSNMs48CH3Rts9HoCzYvs+9m5ZR/VkYtWVCR61 9owrdjT79HX9fKuYExwoNcsEcSiZD1DKXPy4YdLAhCPS4mjPRIYrrYMwgCQUTq83f2+N QFnA== X-Gm-Message-State: ABuFfohcruYIdvLNDm6diH91PXrZZg4rCRKfREjlECIItXAtUprIEzhQ Q3K8hfanzYs8cihL9gWYcyipDrpt X-Google-Smtp-Source: ACcGV61EP2NO0CW+dJw5LQMUckR/ryIrT5lZi2+uN9yvhlsA545Aibwn79P7yhmHDNXBk4P5C3WUkw== X-Received: by 2002:a25:bb0e:: with SMTP id z14-v6mr874725ybg.405.1539267662858; Thu, 11 Oct 2018 07:21:02 -0700 (PDT) Received: from ?IPv6:2600:1003:b028:70fe:344a:e86:8404:7db0? ([2600:1003:b028:70fe:344a:e86:8404:7db0]) by smtp.gmail.com with ESMTPSA id u143-v6sm15640646ywc.28.2018.10.11.07.21.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 07:21:01 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-099D9480-8EFC-46DC-9B51-943A1C1090AD Mime-Version: 1.0 (1.0) Subject: Re: Batch: DB password with ">" From: John Scalia X-Mailer: iPhone Mail (16A366) In-Reply-To: Date: Thu, 11 Oct 2018 10:21:01 -0400 Cc: "Schenk, Hendrik" , "pgsql-admin@lists.postgresql.org" Content-Transfer-Encoding: 7bit Message-Id: References: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> To: "David G. Johnston" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-099D9480-8EFC-46DC-9B51-943A1C1090AD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable And you may need to escape it with a preceding \ character. =E2=80=94 Jay Sent from my iPhone > On Oct 11, 2018, at 9:45 AM, David G. Johnston wrote: >=20 >> On Thursday, October 11, 2018, Schenk, Hendrik wrote:=20 >> How can I use this with a password like this? >>=20 >=20 > Maybe use single quotes to prevent the shell from seeing its special symbo= l? >=20 > David J.=20 --Apple-Mail-099D9480-8EFC-46DC-9B51-943A1C1090AD Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable And you may need to escape it with a preced= ing \ character.
=E2=80=94
Jay

Sent from my iPhone

On Oct 11, 2= 018, at 9:45 AM, David G. Johnston <david.g.johnston@gmail.com> wrote:

On Thursday, October 11, 2018, Schenk, Hendrik= <hendrik.schenk@sieb-mey= er.de> wrote: 

How can I use this with a passwo= rd like this?


Maybe use single quotes to prevent the she= ll from seeing its special symbol?

David J. 
= --Apple-Mail-099D9480-8EFC-46DC-9B51-943A1C1090AD-- From shreeyansh2014@gmail.com Thu Oct 11 15:16:35 2018 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 1gAci4-0001gF-4S for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 15:17:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAci2-0007Im-5O for pgsql-admin@arkaria.postgresql.org; Thu, 11 Oct 2018 15:17:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAci1-0007Ie-Oy for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 15:17:05 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAchx-0006td-ON for pgsql-admin@lists.postgresql.org; Thu, 11 Oct 2018 15:17:04 +0000 Received: by mail-yw1-xc44.google.com with SMTP id e201-v6so3723594ywa.3 for ; Thu, 11 Oct 2018 08:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BgeYsl+NP928/PO6UknNjdXMVN+Pf9ThXSzG5ozS6JA=; b=DGIYqAIYO8OxB27aynX17D9SM9ddVMVM09FH+iWdRWWcp3YCNjlgC78kEIfDM9VR3x UZLyhO5efwTozu73cJ1trCkiYgPxoaVOdVkZtDlVfQXl0YHD87yiUafjzxX5MCZ3PZXx Tdxnn5P6H51tY4vnNIVbkZ2Xk+b7bvhx0w3Ps39GMLgUrookIVgOBOVQFa/xkA0SFKNv 6bN+EPad5jf/UJ/4scYyiFE/+wpZAjrwQLTTdp1BoBg6IRbTiKsj05+/2+GWdJxAC6xs 6oicJhI6gcw1fLO2XHkWOhvSqI9N1J3IPQ/nXiN/5N2Kb5pPFAlnxp1aPcaeS9MOtmQW 8waQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BgeYsl+NP928/PO6UknNjdXMVN+Pf9ThXSzG5ozS6JA=; b=Vb+GRa8eIDA4xJDNyX4wgCaWVqKwXWxKeeythXaCbrdXat4zZhjwvSwX6m5wZZXBQv 9y8k6l1at2NEH1/wkAy+rxJKw6TQRGPMU2Kv+Y/Ftn6eukbuNM4PbftzjmXCS5zc9TEu 9DDmPCannhFUb5ytr0eydeAwBOkrj7cNfRcR5QZo2rBFC8vQ+EKSwJ/umPta3DxeHc6R Ei6fgK1LZYNDY8JqjnnoHnlKVLtf5S2rnks/bJUi0Rek0EqWaqpwqYtzqlgk2MVaSSVO zdurMrQN6CgMUBESNE0WcD6SzpOSfuvWI8vwiNi5YiPaFY9oPjJTIQSG9DTomMJFBYuj jGFw== X-Gm-Message-State: ABuFfogN49h7CdLBQl9aezotFSzkqElwTf0LwsuhEG2uiFl9TrUB9LTR e4bIgeKNOFPcQhpdoTIVQtZPtlkY/TmKdloYp+U= X-Google-Smtp-Source: ACcGV63yaXP8lwSvgADlhCfPJMwEgph1I45/1mYW9E04F674NP0A5gzIFTensRqbuj/s0Atu7PhADc2AO7MgpwBfGQg= X-Received: by 2002:a81:7303:: with SMTP id o3-v6mr1058732ywc.444.1539271020871; Thu, 11 Oct 2018 08:17:00 -0700 (PDT) MIME-Version: 1.0 References: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> In-Reply-To: <5a251002104944a2955bdf4dbaea3a42@sieb-meyer.de> From: Shreeyansh Dba Date: Thu, 11 Oct 2018 20:46:35 +0530 Message-ID: Subject: Re: Batch: DB password with ">" To: hendrik.schenk@sieb-meyer.de Cc: pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000006983780577f576ba" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000006983780577f576ba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, You can use below command to get the desired output. echo localhost:5432:postgres:postgres:7Ug^\>uAks!{VA > %PGPASSFILE% or echo "localhost:5432:postgres:postgres:7Ug^>uAks!{VA" > %PGPASSFILE% On Thu, Oct 11, 2018 at 6:38 PM Schenk, Hendrik < hendrik.schenk@sieb-meyer.de> wrote: > Hi, > > > > i want to modiy the adatabse via batch script. The user has a password > that contains symbols like that =E2=80=9Cg>uAks!=E2=80=9D. The problem he= re is the =E2=80=9Cgreater > than=E2=80=9D-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 =E2=80=9Cecho=E2=80=9D it, it will not = work, because of > the >-symbol. > > > > > > *C:\Users\hschenk>set PGPASSWORD=3Dlalal>lala* > > > > *C:\Users\hschenk>echo %PGPASSWORD%* > > *Lalal* > > > > How can I use this with a password like this? > --0000000000006983780577f576ba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

You can use below command to get the desired outpu= t.

echo localhost:5432:postgres:postgres:7Ug^\>uAks!{VA > %PGP= ASSFILE%
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 or
echo "local= host:5432:postgres:postgres:7Ug^>uAks!{VA" > %PGPASSFILE%=C2=A0<= /div>


<= /div>

=

On Thu, Oct 11, 2018 = at 6:38 PM Schenk, Hendrik <hendrik.schenk@sieb-meyer.de> wrote:

Hi,

=C2=A0

i want to modiy the adatabse vi= a batch script. The user has a password that contains symbols like that =E2= =80=9Cg>uAks!=E2=80=9D. The problem here is the =E2=80=9Cgreater than=E2= =80=9D-symbol.

=C2=A0

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

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

=C2=A0<= /i>

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

=C2=A0<= /i>

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

=C2=A0

=C2=A0

=C2=A0

=C2=A0

If I set a Enviromentvariable a= nd =E2=80=9Cecho=E2=80=9D it, it will not work, because of the >-symbol.=

=C2=A0

=C2=A0

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

=C2=A0<= /i>

C:\Users\hschenk>echo %PGPASSWORD%

Lalal

=C2=A0<= /i>

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

--0000000000006983780577f576ba--