...as soon as placeholders come into play, don't use the do method.
I would disagree with this, in some cases. First, I think the syntax is less ugly when using placeholders (just looking at your example), and second, for databases that support query caches (and cached query plans), using placeholders makes it more likely that your query will be found in the cache (though this second point does not apply to PostgreSQL, yet).
But I'm also still curious as to why the OP's original code has a problem, and IMHO it would be worthwhile debugging it to make DBD::Pg a better module, if indeed it is a bug with that module. I tried to reproduce the problem myself (see above), but I couldn't see any problem, which makes me think it might be the version of DBD::Pg (in which case forget debugging, just upgrade).
Oh, and the second argument to "do" is a hash reference, but it is rarely used, and so it is usually set to undef.
In reply to Re^2: DBD::Pg placeholder problem
by runrig
in thread DBD::Pg placeholder problem
by McMahon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |