I'm trying to run a Postgres query like below and store the results into an array:
v2_ids=$(psql $(credstash get database/path/here) -tc "select distinct(user_id) from table where yada yada yada..." )
read -a arr_ids_temp <<< $v2_ids
Is there a better way to do this? It seems that read -a only grabs the first result sometimes and I'm not sure why.
user_idis not null or nullable in your table?..