Re: User input to queries

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: User input to queries
Date: 2020-12-09 18:17:51
Message-ID: 2B4FBE35-046A-49EF-9E4E-BE2F1E29E617@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Rich,

> On 09. Dec, 2020, at 19:10, Rich Shepard <rshepard(at)appl-ecosys(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2020-12-09 18:22:58 Re: User input to queries
Previous Message Rob Sargent 2020-12-09 18:14:13 Re: User input to queries