Am 21.09.2012 21:48, schrieb Patrick TJ McPhee:
I've made a change which allows queries to be made like this, using the
classic interface:

db.query("insert into x (a,b,c) values ($3,$1,$2)", 'bravo', 3, 'alpha')
db.query("select * from x where a = $1", 'alpha')

I think that's a good idea. I guess the only reason why this was not supported in the classic API so far is that PQexecParams was not available in earlier Postgres versions. I think it also makes sense to use the Postgres way of referencing parameters, even if it is different from the way it's done in the DB-API2 interface (Python style parameter formatting), since the idea of the classic interface is to be a more bare-bones, Postgres specific API.

I'll help in polishing the patch and adding the necessary tests, if others agree that it's really a good idea.

-- Chris
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to