Re: Using psql's \prompt command

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using psql's \prompt command
Date: 2025-01-30 22:40:56
Message-ID: CANzqJaAWHhkaOq5LzMUTPq38zg6D3=PGP42YjDEGdO11kRnOrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 30, 2025 at 5:28 PM Rich Shepard <rshepard(at)appl-ecosys(dot)com>
wrote:

> On Thu, 30 Jan 2025, David G. Johnston wrote:
>
> > Prompt isn’t your issue. Prompt stores the value into a variable. 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=NAME=VALUE".

https://linux.die.net/man/1/dialog

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2025-01-30 22:44:20 Re: Using psql's \prompt command
Previous Message Rich Shepard 2025-01-30 22:38:34 Re: Using psql's \prompt command