Hi all,
I am getting a warning in the Postgres log for every time a PickleCol is
written to the database. Since my app uses a pickled col extensively in one of
the more frequently used tables, the Postgres logs are filled with these
warnings:
----------------------
WARNING: nonstandard use of \\ in a string literal at character 50
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
----------------------
This is with SQLObject v1.3.0, but it has been there from at least v0.12.4
from which I am upgrading to 1.3.0 now.
PostgresSQL is v8.4.11 on Debian Squeeze.
An example test case to illustrate the problem is inline below.
Any help on how to solve this so I can get my log files cleaned up, in order
to debug another connection problem, would be greatly appreciated.
Thanks,
Tom
-------------------------------
from sqlobject import *
db = dict(user='tomc',
passw='',
host='',
dbname='tomc')
dbURI = "postgres://%(user)s:%(passw)s@%(host)s/%(dbname)s" % db
connection = connectionForURI(dbURI)
sqlhub.processConnection = connection
# Default pickled data - try to use as many object types as possible for tests
defaultConfig = dict(ports=2,
remote=False,
logger=None,
services=['web', 'database'],
dns=dict(hostname=None,
domain='foo.bar')
)
# Define the sampe table with a pickled column
class Server(SQLObject):
name = StringCol()
config = PickleCol(notNull=True, default=defaultConfig)
# Drop and create table
Server.dropTable(ifExists=True)
Server.createTable()
# Turn on SQLObejct debugging
connection.debug=True
# Add test records while tailing the postgresql log files
s1 = Server(name='foo')
-------------------------------
|