On Sun, May 19, 2002 at 10:48:42PM -0400, Andrew Perrin wrote:
> Greetings-
>
> Recently I upgraded to PostgreSQL 7.2.1, running under debian's
> "woody" release. Since then, perl scripts using DBD::Pg and placeholders
> aren't working. The equivalent SQL statements, sent through DBD::Pg, work
> fine, so I know it's a problem with the placeholders. I've upgraded to
> the most recent DBD::Pg (1.13).
>
> Here's the symptom:
>
> my $put = $dbh->prepare('UPDATE letters SET sc_auth_sum = ?, ' .
> 'sc_anti_auth_sum = ?, ' .
> 'sc_pro_auth_sum = ?, sc_auth_valence = ? WHERE letterid = ' .
> '?');
>
I have been using 7.2.1 almost as soon as it came out
and don't experience your problem. My DBD::Pg is 1.12 however.
I really wonder why you don't have a much more readable statement like
----------------------------
my $put = $dbh->prepare('UPDATE letters SET sc_auth_sum = ?,
sc_anti_auth_sum = ?,
sc_pro_auth_sum = ?, sc_auth_valence = ? WHERE letterid =
?');
---------------------------
Postgres does not care much if you put in line breaks.