Re: \prompt for psql

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org, Chad Wagner <chad(dot)wagner(at)gmail(dot)com>
Subject: Re: \prompt for psql
Date: 2007-02-08 10:01:56
Message-ID: 20070208100156.GE27377@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Thu, Feb 08, 2007 at 10:17:19AM +0100, Peter Eisentraut wrote:
> 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.

That also requires a "reasonable shell", which all platforms don't
have...

//mha

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Chad Wagner 2007-02-08 11:25:31 Re: \prompt for psql
Previous Message Gurjeet Singh 2007-02-08 09:51:32 Re: \prompt for psql