I'll take a look.
Maybe it is related to paramstyle o similar setting.

Can you fill a bug issue, just in case I forget about this..

https://code.google.com/p/pg8000/issues/entry

Best regards,

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


On Tue, Jul 17, 2012 at 12:22 PM, Massimo Di Pierro
<massimo.dipie...@gmail.com> wrote:
> 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