Psql output into array and read 2 fields into different variables

Hello

Just edited the entry to make it easier to understand what i want

How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this

INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")

RESULT:

en_US | 
de_DE | de
fr_CH | fr_CH
en_GB | en_GB 
fr_FR | fr

Thats what i want to do: first column is working fine second column not accessible for my brain :frowning:

            for iso in ${INSTALLEDLANG}
            do
            echo "processing ${iso} language ..."
            FILES=$(find ${LANGUPDATEWORKINGPATH} -name ${iso}.po |xargs readlink -f | grep ${area})
                for f in ${FILES} #cycle all addons in addons-loaded and check langfile and path
                do
                    echo "Processing $f file..."
                    sudo su - ${DBNAME} -c \
                    " ${INSTANCE_PATH}/odoo/openerp-server -c ${DATABASECONFIGFILE} -d ${DBNAME} -l ${SECONDROWHERENEEDED} --i18n-import=${f} --i18n-overwrite"
                done
            done

The other way around was the idea to psql every field in a single variable but i do not know how to use both in the same loop to access the same line in both cause i cannot access the variables even if they are single written with psql in a way like an index ${variable[$pos]}

cheers winston