Re: \prompt for psql - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: \prompt for psql
Date
Msg-id 200702081017.21034.peter_e@gmx.net
Whole thread Raw
In response to \prompt for psql  ("Chad Wagner" <chad.wagner@gmail.com>)
Responses Re: \prompt for psql
Re: \prompt for psql
List pgsql-patches
Chad Wagner wrote:
> This adds the ability to "prompt" for internal variable input, below
> are examples:
>
> test=# \prompt x
> Enter value for "x": 3

You can do this already approximately so:

\echo -n 'Enter value: '
\set x `read && echo $REPLY`

Maybe one command is better, though.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-patches by date:

Previous
From: "Takayuki Tsunakawa"
Date:
Subject: Re: Configure template change to use SysV Semaphors on darwin
Next
From: "Gurjeet Singh"
Date:
Subject: Re: \prompt for psql