Re: [GENERAL] user input during runtime

2007-02-17 Thread Joshua D. Drake
Bruce Momjian wrote: > Magnus Hagander wrote: >> Win32 will deal with the backticks Ok, but not the read && echo part. >> You can set it to the output of a variable, for example >> \set x `echo foo` >> >> but I haven't been able to trick it into actually reading something. One >> would think someth

Re: [GENERAL] user input during runtime

2007-02-17 Thread Bruce Momjian
Magnus Hagander wrote: > Win32 will deal with the backticks Ok, but not the read && echo part. > You can set it to the output of a variable, for example > \set x `echo foo` > > but I haven't been able to trick it into actually reading something. One > would think something like: > \set x `set /p Z

Re: [GENERAL] user input during runtime

2007-02-17 Thread Magnus Hagander
David Fetter wrote: > On Fri, Feb 16, 2007 at 08:23:48PM -0500, Bruce Momjian wrote: >> Ashish Karalkar wrote: >>> Hello All, >>> I want to prompt user to input some value and do some action on that value >>> in runtime of a sql script. >>> Is there any psql command to do this ?? >>> I can use \ec

Re: [GENERAL] user input during runtime

2007-02-17 Thread David Fetter
On Fri, Feb 16, 2007 at 08:23:48PM -0500, Bruce Momjian wrote: > Ashish Karalkar wrote: > > Hello All, > > I want to prompt user to input some value and do some action on that value > > in runtime of a sql script. > > Is there any psql command to do this ?? > > I can use \echo do display massage

Re: [GENERAL] user input during runtime

2007-02-16 Thread Bruce Momjian
Ashish Karalkar wrote: > Hello All, > I want to prompt user to input some value and do some action on that value in > runtime of a sql script. > Is there any psql command to do this ?? > I can use \echo do display massage > but to take input what is the command? > Thanks in advance You can do: