[DB-SIG] Re: any 2.0-compliant packages for postgresql? (Andy Dustman)

Paul DuBois paul@dubois.ws
Fri, 29 Jun 2001 23:22:18 -0500

At 1:25 AM +0200 6/30/01, Federico Di Gregorio wrote:
>On 29 Jun 2001 12:34:39 -0400, Billy G. Allie wrote:
>>  I agree with Andy's statement.  That is how I implemented execute in my
>>  PostgreSQL DB-API 2.0 module, PyPgSQL.  You always use '%s' (or '%(name)s')
>>  as placeholder in the query string and PyPgSQL will apply the 
>>correct quoting
>>  based on the type of the parameter.
>carefully looking at the dbapi and at the postings on this ml, this is,
>imo, wrong. the '' should be added by the driver not by the user. is
>this right? is this what the dbapi is trying to say in footnote 5?

Looking back at the original postings, it appears that the '' you refer
to are simply there to set off %s and %(name)s in the paragraph.  They're
not present in the code in question.  The behavior of the code is just
what you think it should be.

>can someone of the original authors of the dbpai-2.0 please clarify?
>federico (going to add quoting to psycopg... :)
>Federico Di Gregorio
>MIXAD LIVE Chief of Research & Technology              fog@mixadlive.com
>Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
>                       The number of the beast: vi vi vi. -- Delexa Jones