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 <[EMAIL PROTECTED]> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match