You are on the right track with
Re^2: DBD::Pg - $sth->execute($csv_var) ERROR, but to understand why this doesn't work
I thought $sth->execute($columns,$values); would be closer to passing the flat comma separated string Pg needs.
you need to be aware of the difference between
- a string containing comma separated list of values (in Perl: a scalar)
- a list of values (in Perl: a list or an array)
So, even DBI could use "placeholded" column names, you'd have to
execute ( split(/,\s*/,$columns), split(/,\s*/, $values))