Re: psycopg2 gets confused by % characters and strict pyformat mode
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno mer, 10/09/2008 alle 17.43 +0800, James Henstridge ha scritto:
> > Currently there is no way. A patch would be welcome.
>
> Isn't that likely to break existing applications that depend on the
> current behaviour? From what I can see, the current behaviour when
> parameters are passed matches the DB-API specification.
>
> It is debatable whether the behaviour when no parameters are passed is
> correct (should it parse the '%' signs in that case?), but this
> proposal seem to move things further away.
Sorry, I was thinking about the %(...) version only. We support also %s
so such a patch would work only in the pydict case. I suppose the query
parser can just double % chars that are not followed by a "(" if at
least on %( is found. tricky.
federico
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer [email protected]
INIT.D Developer fog-NGVKUo/i/[email protected]
The only thing I see is if you are pumping so much data into the
database all the time when do you expect to look at it?
-- Charlie Clark
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkjHmLYACgkQvcCgrgZGjevTtACfV5q7KI7ANIStAFbb0CD4BC9r BCMAoIU9LiZzEN5IHMBA3PdKEWeq5iD5 =PKyP -----END PGP SIGNATURE-----