Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPOCR-00As5Z-KI for pgsql-general@arkaria.postgresql.org; Fri, 28 Jul 2023 14:12:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qPOCP-00GTN1-VQ for pgsql-general@arkaria.postgresql.org; Fri, 28 Jul 2023 14:12:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPOCP-00GTMt-Kd for pgsql-general@lists.postgresql.org; Fri, 28 Jul 2023 14:12:09 +0000 Received: from mail-yb1-xb31.google.com ([2607:f8b0:4864:20::b31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qPOCL-0023Ap-Or for pgsql-general@lists.postgresql.org; Fri, 28 Jul 2023 14:12:08 +0000 Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-c5ffb6cda23so2125298276.0 for ; Fri, 28 Jul 2023 07:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690553525; x=1691158325; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hi0+Ezrc7ZhUt09hGPXxbzRQ7/5gQv/CIeT+R81hgEA=; b=R+fJdM0XOA3+cjj6TX+HP51k1LoKWZ4uohcHRD0pDevOu6pkhqMtb2pD6oufRpzQ6S VG0pw15ALl8qRHslvtANmx6KvbynM4JkCM7o5aOMsXcTKkmKnL8ebpgDiYvImW5Fnb+5 RDy6mMZI7QP+hlw6A0HVDQbosu4UoAUXyWTyy6brcpaOda3Z409yF9/eovKMHHNTrMNn 0ijZBhVnLoMi0kU0PyGoRuG6wW94m9WzT0VtutEHczMFZqcHgB4yhMhpN7CYd3TT9lZb DDlydFfUWI8WDV8Mhph0aF4vocgYenkU4mx56OT5BKLSU+T94vFbpPmqp9b2bqH6PK98 nIQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690553525; x=1691158325; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hi0+Ezrc7ZhUt09hGPXxbzRQ7/5gQv/CIeT+R81hgEA=; b=jh6FaQ+/eYu3T284EzeFft0h7uFmgPHELyB9Web/soOjY+3qZwZ95r1XL0vk1NPyJ+ NqG3j5V39tGJXTha4YhxLSSbs6nBMIGxZjg6D9s/uWLkkf9zWSh8g9S+U7VHwahKodWN ZLL8l/hAiNnvbuYIBmNg+HJ9hj+IBkS6WABTUaDMbYAZHHlhYSWTfBVVawT/ln+yTf4r Tohh8wcQbOrG2dFNE5QQ5Mf7hG0OilDjL5VmGBX5fmRng4dXtKFMTi+CIayAlhg2qJfJ BJbIbX8hinG39125JyouSNg4mwy47pUfNpkgMdpT2cYN6vrZxDWMqWAYbYRHbNiOaUCB 9nSQ== X-Gm-Message-State: ABy/qLZAJTrilrWVm3xtiI7Vd6pMGuy6l3jWbzkrNWFp2rMY3Z2slYRD CDHP8UNOUAJeLoklnXeIz2PorQRrDs4= X-Google-Smtp-Source: APBJJlE+42hTPAIz7YAFc5Dwx2xm8xyB+/UYSbvvvjAs1d2Fwrp+VfjIMTlleTXRLN9v4I0E5HfPVg== X-Received: by 2002:a25:ad91:0:b0:d18:ae66:c768 with SMTP id z17-20020a25ad91000000b00d18ae66c768mr1582018ybi.47.1690553524792; Fri, 28 Jul 2023 07:12:04 -0700 (PDT) Received: from ?IPV6:2600:1700:bd2c:b810:c11c:5df6:9acb:ecd1? ([2600:1700:bd2c:b810:c11c:5df6:9acb:ecd1]) by smtp.googlemail.com with ESMTPSA id y8-20020a25ad08000000b00d1d0841d911sm843508ybi.17.2023.07.28.07.12.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 07:12:04 -0700 (PDT) Message-ID: Date: Fri, 28 Jul 2023 09:12:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: password error in batch script Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.