[DB-SIG] Re: any 2.0-compliant packages for postgresql? (Andy
Dustman)
Federico Di Gregorio
fog@mixadlive.com
30 Jun 2001 13:36:38 +0200
On 29 Jun 2001 23:22:18 -0500, Paul DuBois wrote:
> At 1:25 AM +0200 6/30/01, Federico Di Gregorio wrote:
> >On 29 Jun 2001 12:34:39 -0400, Billy G. Allie wrote:
> >[snip]
> >> 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.
oops! my fault then. we all agree. back to hacking.
--
Federico Di Gregorio
MIXAD LIVE Chief of Research & Technology fog@mixadlive.com
Debian GNU/Linux Developer & Italian Press Contact fog@debian.org
All programmers are optimists. -- Frederick P. Brooks, Jr.