| From: | postgres(at)vrane(dot)com | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: DBD::Pg: Placeholders not working | 
| Date: | 2002-05-20 03:09:09 | 
| Message-ID: | 20020519230909.B1777@amd.universe | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-05-20 03:24:44 | Re: DBD::Pg: Placeholders not working | 
| Previous Message | Andrew Perrin | 2002-05-20 02:48:42 | DBD::Pg: Placeholders not working |