Can you please run a test for me?

In dal.py there are these lines:

    def adapt(self,obj):
        return psycopg2_adapt(obj).getquoted()

can you plase replace them with

    def adapt(self,obj):
if self.driver == self.drivers.get('pg8000'):
            obj = str(obj).replace('%','%%')
        return psycopg2_adapt(obj).getquoted()

Does this fix the problem? This is a pg8000 bug anyway. Even if the 
workaround fixes it, it will cause problems once the bug in the driver is 
fixed.



On Tuesday, 17 July 2012 00:34:03 UTC-5, KMax wrote:
>
> db.py:
> db = 
> DAL('postgres:pg8000://username:u$erpas$@localhost/userdb',pool_size=10,
>          check_reserved=['postgres', 'mssql', 'mysql'])
> db.define_table('mytable',Field('myfield','string'))
>
>
> default.py:
> def index():
>     return dict(form=crud.create(db.mytable))
>
>
> Posting % into form gives an error.
>
> error attached
>

On Tuesday, 17 July 2012 00:34:03 UTC-5, KMax wrote:
>
> db.py:
> db = 
> DAL('postgres:pg8000://username:u$erpas$@localhost/userdb',pool_size=10,
>          check_reserved=['postgres', 'mssql', 'mysql'])
> db.define_table('mytable',Field('myfield','string'))
>
>
> default.py:
> def index():
>     return dict(form=crud.create(db.mytable))
>
>
> Posting % into form gives an error.
>
> error attached
>

-- 



Reply via email to