Re: User input to queries - Mailing list pgsql-general

From Paul Förster
Subject Re: User input to queries
Date
Msg-id 2B4FBE35-046A-49EF-9E4E-BE2F1E29E617@gmail.com
Whole thread Raw
In response to Re: User input to queries  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: User input to queries  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
Hi Rich,

> On 09. Dec, 2020, at 19:10, Rich Shepard <rshepard@appl-ecosys.com> wrote:
>
> Looking at the postgres-12 doc I cannot find a command 'PROMPT' anywhere in
> it.

but 12 has it:

postgres=# \prompt 'input: ' input
input: this is test input
postgres=# select version(), :'input';
                                      version                                       |      ?column?
------------------------------------------------------------------------------------+--------------------
 PostgreSQL 12.5 on x86_64-pc-linux-gnu, compiled by gcc (SUSE Linux) 7.5.0, 64-bit | this is test input
(1 row)

postgres=# \?
...
Variables
  \prompt [TEXT] NAME    prompt user to set internal variable
  \set [NAME [VALUE]]    set internal variable, or list all if no parameters
  \unset NAME            unset (delete) internal variable
...

Cheers,
Paul


pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: User input to queries
Next
From: Rich Shepard
Date:
Subject: Re: User input to queries