Re: DBD::Pg: Placeholders not working
От | postgres@vrane.com |
---|---|
Тема | Re: DBD::Pg: Placeholders not working |
Дата | |
Msg-id | 20020519230909.B1777@amd.universe обсуждение исходный текст |
Ответ на | DBD::Pg: Placeholders not working (Andrew Perrin <clists@perrin.socsci.unc.edu>) |
Список | pgsql-general |
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.
В списке pgsql-general по дате отправления: