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 1tddDj-008aw9-9q for pgsql-general@arkaria.postgresql.org; Thu, 30 Jan 2025 22:41: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 1tddDi-00Djv6-DF for pgsql-general@arkaria.postgresql.org; Thu, 30 Jan 2025 22:41:10 +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 1tddDi-00Djuy-25 for pgsql-general@lists.postgresql.org; Thu, 30 Jan 2025 22:41:10 +0000 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tddDf-002MfO-2Z for pgsql-general@postgresql.org; Thu, 30 Jan 2025 22:41:09 +0000 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-2b22c2f5103so598795fac.1 for ; Thu, 30 Jan 2025 14:41:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738276867; x=1738881667; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=ZBEApAXJ7M1BMCx8idwnWWQ32btsFsAQL7MZ/Sabq+4=; b=Q9N4IP22AyRpZRAAuvI3R5upH3m4WonTYEFqqykqhODXTtT0kO8BjddPRVkrSUQVNJ Nv/H3OEWo7cm/tKQS/iflwYa7uxzICnKKTwlYFvdXvdpLWw1cHQbbl93aDsv0kVI5PR1 e7CCOubb5Nrhglo4xLvPIr3kZCdLByUvXRyJ42ZOGN+QFbx+uw6kwP4ddtf2Iyo8N59R tndIPh3Sa/g0GzXiu+kDi/ZvcPprZDvLZFxXwPcOJG17bO66B4CpKBNxr7zYXmPjW3tv wAgSssBC0ltlek2PWR0RWtqpNcu/dZcaK8QyLqDUtzjOvCc6Lugta/KNajH33dtGXFkG DHIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738276867; x=1738881667; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZBEApAXJ7M1BMCx8idwnWWQ32btsFsAQL7MZ/Sabq+4=; b=G/fas2+N5DiFUmesCaI/rYmP7rR16h7eDgwWqU01duUL2PD8CztdUqRJZXCGaz8cfr OtZlTtCVhbObb/7WWSiC5sPYXj9A7j08fi2/kHaT/P2ffLcpWTkNJqnSWBcjScVZhT7L F4a/Gbi9pWwhl32Aag+PEoq0HQRVec0g5wMNItMAhDdD7uAPgjbX5CsV55gDQfAyfOJk YPfeWDdc6oNR91gN9eSxYVdAVh+4yzFfsWM7deuErBf5BhR5bOE7HTHRyIWNO/UwP9kk j/pX0zt9uCl44JXZ4LQckKSMGHkRotn8015fHGvuCcJZi11YPl661Hgp3SyGEFJbLuCf Ug9w== X-Gm-Message-State: AOJu0YyyBpICIzNLbQGt4vBtDA9xNAUbUNFWSq8d3j78NMD5JZRQvH9r 5S4Ym9uCPjV0P9I6I0gxFKChYvubUpmTuUXejU9Dn4l2lpJ9gsnhwM+22VBHm5jLBazchEH9+2a PhlYGo0iqTD/R5Oz5XWHxDuBA4j9YQEJF X-Gm-Gg: ASbGncvRIuRvUq9yLor0PWka4r3Sz5Brt90c67pr0sFzH/7NxCyqN473/J0MZ3TeMIo GoUHJ+K3eHQRVvzTQzpzGSWfPnE0kBS5vKLhWcmauPqqn10gLpyisny5fPYisPu/yAT+hd0mpg5 mXNll6ldsFCLaBaekHpnkYdgX2/jsxp6w= X-Google-Smtp-Source: AGHT+IHfwkH0s0bJYI6j8FO9aDELc1y6ku3vlj9myl4or+7AO18qVNbelVuVoEGwQlrAbHLBv72bjGZn+gvaz74nk4Y= X-Received: by 2002:a05:6871:6183:b0:29e:27b6:bea5 with SMTP id 586e51a60fabf-2b32f3706edmr5620943fac.25.1738276867040; Thu, 30 Jan 2025 14:41:07 -0800 (PST) MIME-Version: 1.0 References: <1dbc1ace-c119-6ed2-d579-561525f3bf0@appl-ecosys.com> <28334f3d-5942-4849-374f-32f2f6a4e9c@appl-ecosys.com> In-Reply-To: <28334f3d-5942-4849-374f-32f2f6a4e9c@appl-ecosys.com> From: Ron Johnson Date: Thu, 30 Jan 2025 17:40:56 -0500 X-Gm-Features: AWEUYZnTjkdiktOPYQGt5-WBbrnLCR67URoEziiGtBrRj4vhyWuq0jxBrLLGnTU Message-ID: Subject: Re: Using psql's \prompt command To: "pgsql-general@postgresql.org" Content-Type: multipart/alternative; boundary="0000000000002e7004062cf41fc9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000002e7004062cf41fc9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 30, 2025 at 5:28=E2=80=AFPM Rich Shepard wrote: > On Thu, 30 Jan 2025, David G. Johnston wrote: > > > Prompt isn=E2=80=99t your issue. Prompt stores the value into a variabl= e. Read > how > > to reference variables in a psql script. > > David, > > Thank you. I'll look into using the \set command. > Instead of \set (which can be tricky and unintuitive), consider the dialog command with "psql --set=3DNAME=3DVALUE". https://linux.die.net/man/1/dialog --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --0000000000002e7004062cf41fc9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jan 30, 2025 at 5:28=E2=80=AFPM R= ich Shepard <rshepard@appl-e= cosys.com> wrote:
On Thu, 30 Jan 2025, = David G. Johnston wrote:

> Prompt isn=E2=80=99t your issue. Prompt stores the value into a variab= le. Read how
> to reference variables in a psql script.

David,

Thank you. I'll look into using the \set command.
=
Instead of \set (which can be tricky and unintuitive), consi= der the dialog command with "psql --set=3DNAME=3DVALUE".

=C2=A0
--
Death to <Redacted>, and butter sauce.
Don'= ;t boil me, I'm still alive.
<Redacted> lobster!
--0000000000002e7004062cf41fc9--