This is what I get from shell: >>> db=DAL() >>> db.define_table('x',Field('y')) >>> db.x.insert(y='hello\world') 1 >>> print db.x[1] <Row {'update_record': <function <lambda> at 0x17279b0>, 'y': 'hello\ \world', 'id': 1, 'delete_record': <function <lambda> at 0x17279f0>}>
Which version of postgresql are you using? On Jan 8, 5:00 am, David Austin <nitsuadi...@gmail.com> wrote: > Hi, > > I think I've narrowed down the problem - web2py doesn't escape > backslashes > in its SQL strings. Everything I found on the web said that > backslashes had > to be escaped for SQL (though I couldn't confirm this with an official > document). > > My solution is to add escaping of backslashes to the last line of > sql_represent > in gluon/sql.py > > Regards, > David