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:
\echo -n 'Enter value: '
\set x `read && echo $REPLY`
in psql. I think we will have \prompt in 8.3.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +