You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following example from the txpostgres documentation no longer works with psycopg2cffi:
#!/usr/bin/env pypy fromtxpostgresimporttxpostgresfromtwisted.internetimportreactorfromtwisted.pythonimportlog, utilcredentials= {
"dbname": "DBNAME",
"user": "USER",
"password": "PASSWORD",
"port": 5432,
"host": "localhost"
}
conn=txpostgres.Connection()
d=conn.connect(**credentials)
# run the query and print the result d.addCallback(lambda_: conn.runQuery('select tablename from pg_tables'))
d.addCallback(lambdaresult: util.println('All tables:', result))
# close the connection, log any errors and stop the reactor d.addCallback(lambda_: conn.close())
d.addErrback(log.err)
d.addBoth(lambda_: reactor.stop())
# start the reactor to kick off connection estabilishing reactor.run()
The following example from the txpostgres documentation no longer works with psycopg2cffi:
The result is:
It looks like some similar issues were resolved in commit e9434546ad728b5cbc327d4d620d527fd3ffe362 but this one may have been missed.
The text was updated successfully, but these errors were encountered: