On Sun, May 5, 2013 at 4:00 PM, Massimo Di Pierro <[email protected]> wrote: > I need help with this: > > 1) the pg8000 in web2py says version 1.10. The only you link says 1.08 but > seems more recent. there are two 1.08 the on github and the one here: > http://pybrary.net/pg8000/ which one should I use?
The github / pubrary were unmaitained, so I begin a separate fork: https://code.google.com/p/pg8000 The "official" repo is: https://github.com/mfenniak/pg8000 I don't know it the official repo work out of the box with web2py, I couldn't test it. > 2) which patches did you make which are not merged? Changelog: ---------- - Added Two Phase Commit support, based on prior TPC connection wrapper for psycopg2 developed originally for http://pgfoundry.org/projects/pyreplica/ - Added autocommit attribute to avoid to send a BEGIN automatically. This is needed for some commands (e.g. CREATE DATABASE, VACUUM...) that require to be run outside any transaction. Thanks funkybob for the original patch (adapted from a method to a property to be compatible with other python connectors) - Fixed NUMERIC representation issue (truncation on string conversion). Thanks zeha for the report and patch. - Fixed "Empty array issue" that raised an exception when SELECTing an empty array field (with any primitive type into). Thanks franklx for the original patch (modified to return a true empty list) - Fixed unicode issue in textout that caused an exception when using PostgreSQL errors in non-English Locale and, in some cases, when using non ASCII chars.Now, the text is encoded correctly using the client_encoding. - Added server_version attribute as reported by the backend. Thanks Ulrich Petri for the patch, docs and test case. - Added OID 194 mapping for "string representing an internal node tree" to support sqlalchemy introspection with PostgreSQL 9.1. Thanks dave42 for the original patch. - Added OID 142 mapping for "xml" type basic support. Thanks dahilia for the report. - Fixed issue with python 2.5 missing ssl (no ssl support if package is not installed) - Added basic automatic test connection setup (using loged-in username) There are more changesets: https://code.google.com/p/pg8000/source/list Some were merged, but not my changes. The problem is that the "official" pg8000 source changed a lot of things (mainly lookig for speed ups), so both code bases are now incompatible. They also implemented some of my changes in a different way. > 3) In postgresqladapter we set: > > SET standard_conforming_strings=on; > > pg8000 ignores this and interprets % as an escape chars. This is a security > issue. How can we make sting escaping conforming to SQL in pg8000? Maybe this helps: https://github.com/mfenniak/pg8000/commit/b59841124f474fe14c69f7ff671e98f814447717 Anyway, a more permanent and secure solution would be using parameters and the correct paramstyle, and not inlining them in the SQL > I may be able to fix 3 if you can send me a patch for 1 and 2. If you can send me the tests case for the issues, I could debug them and make the patches. Please give me some weeks because I'm busy with personal issues and other projects. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

