[DB-SIG] paramstyles, again (and now voting)

Fabien COUTANT fabien.coutant at neuf.fr
Mon Jun 4 19:29:43 CEST 2007


On Mon, 04 Jun 2007 16:32:18 +0200, M.-A. Lemburg wrote:
> We should have a vote on it. Let's gather votes for say two weeks
> and then see what the outcome is.

Here's my application programmer's vote:
 
 -1 on qmark
 +1 on named
  0 on numeric
 -1 on format
 +1 on pyformat

I was initially set at +1 on numeric and changed my mind.  I consider it's
only marginally better than format and qmark, and less good than named and
pyformat.

For me, named and pyformat are the only styles that allow writing
maintanable request code when you have more than 2 parameters/request and
hundreds of/long requests.

W.r.t. sql string parsing matter: I want to add that using a pythonic
parameter markup such as pyformat is less confusing, if needed, to a parser
within a SQL string, because they're coming from 2 different worlds.  I
hope it's unlikely that %(foo)s is valid SQL in any database...  Now,
acceptably, there's the confusion with Python formatting :-/

-- 
Hope this helps,
Fabien.


More information about the DB-SIG mailing list