[DB-SIG] In praise of pyformat

Carsten Haese carsten at uniqsys.com
Sun Aug 12 23:05:44 CEST 2007


On Sun, 2007-08-12 at 13:07 -0400, Mike Meyer wrote:
> I think you just pinpointed the problem: parameter substitution in
> dbapi is being advertised as the solution to a problem it's not really
> adequate to solve.

For the millionth time, it's parameter binding, not parameter
substitution. And it solves exactly the problem it's designed to solve
by the makers of the SQL standard: supplying variable VALUES for a
query.

> [snip proposal...]

-1. The problem that your proposal is trying to solve doesn't exist. For
supplying variable values, parameter binding as it is (with the addition
of making qmark and named mandatory as was decided recently) is
perfectly adequate. For supplying variable table names, column names,
where clauses, and other syntax elements, string formatting seems
perfectly adequate.

Maybe you should illustrate the kinds of problems you're encountering in
whatever it is you're doing that makes you feel that the existing way is
inadequate. Right now, you're coming off somewhat trollish by making
proposals for solving non-existent problems.

-- 
Carsten Haese
http://informixdb.sourceforge.net




More information about the DB-SIG mailing list