In article <[EMAIL PROTECTED]>,
Paul Cunningham <[EMAIL PROTECTED]> wrote:
% I use a bash script (similar to following example) to update tables.
% 
% psql -v passed_in_var=\'some_value\'  -f script_name ....
% 
% Is it possible to pass a value back from psql to the bash script?

If you run it like this

 $(psql -v passed_in_var=\'some_value\'  -f script_name)

and arrange for all the script output to be in the form

  var1="value 1" var2="value 2"
  var3="value 3" ...

then var1, var2, etc will be set in bash (or ksh, or the posix shell).
Note that there are no spaces around the equals signs.
-- 

Patrick TJ McPhee
North York  Canada
[EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to