> How can I get that back out to bash, if I'm doing psql scripting?
> An env. variable wouldn't work, since it would go away when psql
> terminates.

Capture the stdout of the psql command and pipe it through cut in order to
get only the third word of output.

your_shell_variable=`psql -c 'insert into t1 select attrs from t2' | cut -d'
' -f3`


hth,
cl.



>
> TIA
> --
> +-----------------------------------------------------------------+
> | Ron Johnson, Jr.        Home: [EMAIL PROTECTED]             |
> | Jefferson, LA  USA                                              |
> |                                                                 |
> | "I'm not a vegetarian because I love animals, I'm a vegetarian  |
> |  because I hate vegetables!"                                    |
> |    unknown                                                      |
> +-----------------------------------------------------------------+
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to