in reply to Need help with DBD::Pg

Greetings all,
From what I have read of the documentation here it looks as though you will need to use $sth->bind_param() prior to your $sth->execute() in order to correct your varchar vs. int problem.
As for your table locking issue (e.g. your multiple commands issue), it appears as though you will have to split those out (I wish I could point to something in the documentation but I was unable to locate even a part of your error in the docs or the source).
HTH

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Replies are listed 'Best First'.
Re^2: Need help with DBD::Pg
by Miguel (Friar) on Feb 23, 2005 at 21:54 UTC
    I tried that too:
    use DBI qw(:sql_types); use DBD::Pg qw(:pg_types); my $sql = "..."; $sth->prepare($sql); $sth->bind_param(1,$date, {pg_type => PG_DATE}); $sth->bind_param(etc.)... $sth->execute();
    Then, I get this error: Bareword "PG_DATE" not allowed while "strict subs"