I'm not certain I'm answering your question. Do you want an array of 10 strings as a local variable, or 10 shell variables, each containing a string?
The latter requires a weird trick:
#!/bin/bash
COUNTER=1
eval $(psql -t -h 10.100.0.1 -U prasad statistics -c "select command from jobhandler.config_info where conf_name like '%stager%'" |
while read VAR
do
echo "list123$COUNTER='$VAR'"
((COUNTER = COUNTER + 1))
done)
echo list1231="$list1231"
echo list1232="$list1232"
This variant ends up setting shell variables named "list1231", "list1232", "list1233" ..., it does not set different elements of an array shell variable named "list123"