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.96) (envelope-from ) id 1vtaj7-00H3Wy-0w for pgpool-general@arkaria.postgresql.org; Sat, 21 Feb 2026 00:20:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vtaj5-009SXr-1b for pgpool-general@arkaria.postgresql.org; Sat, 21 Feb 2026 00:20:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vtaj5-009SXj-0s for pgpool-general@lists.postgresql.org; Sat, 21 Feb 2026 00:20:03 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vtaj1-00000000SZ2-2Y5j for pgpool-general@lists.postgresql.org; Sat, 21 Feb 2026 00:20:02 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-4362507f396so2538272f8f.0 for ; Fri, 20 Feb 2026 16:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771633194; cv=none; d=google.com; s=arc-20240605; b=bLuG3KQM7idOi9TLR3GPsu5YNTnuz7q24r+i8gPIMxa/ymDJy9ONlW8SdVX968NPO8 WhXaBDyfs3tCiKZ4nEtkTEE+YAwnL9iFI+IlOpMHUnokEJoN8oI72JxodOeRF+hWou+m xLokR8n7mJ/aTSNs+R0rUIRDOCjF9QwVIrnWd89W7DKDP99DbnnnfGxkXgVtFW2KzSP2 lajBX1zYr4/tgOlWfJl7Kex2Yi7vIf3a+vNKXqTKLMLCTW7WPwCnkLuU/Jd7bijXIg9C T7zYr4ze3XuEdBkzU+tRze61dYRT3U6FJYAQWjCSZSdQ9ctpU5mXRho5upAUqr2xsPE4 KqWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Xx707bVFnsbAMc3l+1kKzbea65BVhB2+ruAS1LiRfXI=; fh=xMMdjGeqATPSN1JsgprjFQr1Ad7j2WglwLdGRN1fBho=; b=UFYX7UToYtAHwGgYlt0QjwrLKCbM2AbRaHqvApRHIh7qmNEIKgmALoGaCeHMQnb5FR kOPUeaZducCSBkHoz6KYlqKFZeHo5TDdnNHYMsq168QyPSS4V4k78rz2yzJCYPR3aZAL +ltUSrWUqczAjV6OnOfm2tq+t2QmXfwU35q4ZCVPH/e7HcPM34XHc2Eo1f9p7VhEF+5/ KCTqkMfgo8s8n8Kum8KWrGGKuVZ/JOoHE0ifSgZ9kgz3CGeEzfWhAJEuX6TGsduKYCyY amOHMRaznTHW6S/VbopvSXIWDObuMXMoDFlNFOdUbBmggjEKhRBk2BIQicTJskBluFuq C7Uw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771633194; x=1772237994; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Xx707bVFnsbAMc3l+1kKzbea65BVhB2+ruAS1LiRfXI=; b=RlohWJp6dZAz7Q65EmImybqndLe9nxLIFG2e+zPVuaPbjwzzIlDkSGdwSVM19ntmIb KiLGrLqbc0CsPLu+kgDJTWPufwfvqHcyTNr0aV8VkmvIHw4bipnqRd483TqfSY5JhjiW w0ZtUKWJqO1XJ22r6EJ/IznM/Ail7DAj+ZuxxznyWsxP19Gi7dxHIgTM6BBZYUA/sKqQ cvsfb2eYkJNECA7D013LqIgV9v8lhgYUGjNDDvtNLgiTNuRekYHTQ1D80BY2/ystWaAb tS0/3L8ygSGdKe1akesQFn/3+3YSKvOF0inP3KOCI9GX4MCQvsQuhpzO5LErxX98Fx91 a7NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771633194; x=1772237994; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Xx707bVFnsbAMc3l+1kKzbea65BVhB2+ruAS1LiRfXI=; b=mzbT0AYloAy6B/fTpaTKIcqWzNlsXEV3LdhX7QW+3P03JcxcV3SZ1W7Ee1R9/ZOc4U juP+iy4ABzkDL1gFbxOWdT033DTkPB4eo8FV0O2MwA2Fgrya/E6IEr/LD3Ueg9RBiUvW TFyisliNAUtAnJ4lTVNOi4c07qTNc3ae0jHsQsIUzor77P9gOkjN0b/t5p1mA/B8QX6/ 6y9G0OWjGVQmH7ipSRU24EFYopHrUhPzfVlC7RuxEhd04pj1SkHdXHX0aKYkqOUACGwf ZY2yLNxuVciJqzeiddoawkj/H/P8v/65fpxw3criDmSIK+iJBytJ2Wkn8IVEIO+1tQGl r7iQ== X-Gm-Message-State: AOJu0YzCzIs7WUglWXXo4tkBZRmOdE43oegDkuoho1cOEofvZHd9ocGW xjxZ7X2P6IeO5EAqBW4w6Xo/e72tuhhRkCInGv0a7+FxZeTi9VL+DrceLjyiK6dpTrwUtHrHySN hJe8IZTBarM3BiPcKD1F6edhvLiQAMp4yhA== X-Gm-Gg: AZuq6aJhrY47/8ZJiD95Wn5vTu9bbGzEEE7Kf3JWc5lxO+UH6kFWG6c9Y5+V7cWOPIY iDq838b4NvLPeqS80GXG19xohpeOERNE52R3l1Hh/uegozayu2+0o9sTbtHA8ecZXl5BzfYy2Iw soSTTedT64KOQzSyQ+z+3srfoo8Y98/zzHNJTECV+rzwBooR8s8DLgngVjPPPkkYcqCRi+K5bcc H/eKPGMvunk/6oMReH8v75X4Q4VsbQY4O8eUGLlBtr/dVo4OLukUdJX7wXxkViRchVgxb/H6aLC K4v+N4nHPcPMmJ3Elrs= X-Received: by 2002:a05:6000:2301:b0:437:678b:83c2 with SMTP id ffacd0b85a97d-4396f189eadmr2952353f8f.54.1771633193948; Fri, 20 Feb 2026 16:19:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: zam bak Date: Fri, 20 Feb 2026 19:19:42 -0500 X-Gm-Features: AaiRm50GkOgtEfeLQD2baOr6EsP5DYBRVH0iJo3tMlTpg6Lvjq0LCwMtBHLNUS4 Message-ID: Subject: Re: pg_enc --input-file ability to read from stdin To: Bo Peng Cc: "pgpool-general@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 18, 2026 at 7:39=E2=80=AFPM Bo Peng wrote= : > > Hi, > > Could you try using "--input-file /dev/stdin"? I can confirm that this works! Thank you! > > For example: > cat <<'EOF' | pg_enc --update-pass --config-file etc/pgpool.conf --in= put-file /dev/stdin > username1:secretpassword1 > username2:secretpassword2 > EOF > > --- > Bo Peng > SRA OSS K.K. > URL: https://www.sraoss.co.jp/ > > > ________________________________________ > =E5=B7=AE=E5=87=BA=E4=BA=BA: zam bak > =E9=80=81=E4=BF=A1: 2026 =E5=B9=B4 2 =E6=9C=88 18 =E6=97=A5 (=E6=B0=B4=E6= =9B=9C=E6=97=A5) 1:36 > =E5=AE=9B=E5=85=88: pgpool-general@lists.postgresql.org > =E4=BB=B6=E5=90=8D: pg_enc --input-file ability to read from stdin > > > Hello > > Is it possible to pipe stdin output to pg_end --input-file option by > using dash '-' as a placeholder for stdin? > https://www.pgpool.net/docs/latest/en/html/pg-enc.html > > I tried both "echo" and "cat" and am not able to do it. > > Example 1: > cat <<'EOF' | pg_enc --update-pass --key-file > /etc/pgpool-II/.pgpoolkey --config-file /etc/pgpool-II/pgpool.conf > --input-file - > username1:secretpassword1 > username2:secretpassword2 > EOF > trying to read key from file /etc/pgpool-II/.pgpoolkey > trying to read username:password pairs from file - > failed to open input_file "-" (No such file or directory) > > Example 2: > echo ' > username1:secretpassword1 > username2:secretpassword2 > ' | pg_enc --update-pass --key-file /etc/pgpool-II/.pgpoolkey > --config-file /etc/pgpool-II/pgpool.conf --input-file - > trying to read key from file /etc/pgpool-II/.pgpoolkey > trying to read username:password pairs from file - > failed to open input_file "-" (No such file or directory) > > > The reason for asking about this is: > * to be able to use pg_enc in scripting setups > * to be able to provide list of usernames/passwords without having to > actually create a file > * to be able to reduce escaping when autogenerated passwords contain > special characters (by echoing literals) > > > P.S. > Documentation also does not mention if colon ':' needs to be escaped > (and how) when password contains colon?? > > > > Thanks > Z... > > > >