Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: DBD::Pg - $sth->execute($csv_var) ERROR

by soonix (Canon)
on Mar 13, 2020 at 08:01 UTC ( #11114208=note: print w/replies, xml ) Need Help??

in reply to Re^3: DBD::Pg - $sth->execute($csv_var) ERROR
in thread DBD::Pg - $sth->execute($csv_var) ERROR

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))

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11114208]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2020-06-04 18:43 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (35 votes). Check out past polls.