equal
deleted
inserted
replaced
333 sqlite_hooks.append(init_sqlite_connexion) |
333 sqlite_hooks.append(init_sqlite_connexion) |
334 |
334 |
335 |
335 |
336 def init_postgres_connexion(cnx): |
336 def init_postgres_connexion(cnx): |
337 cnx.cursor().execute('SET TIME ZONE UTC') |
337 cnx.cursor().execute('SET TIME ZONE UTC') |
|
338 # commit is needed, else setting are lost if the connection is first |
|
339 # rollbacked |
|
340 cnx.commit() |
338 |
341 |
339 postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', []) |
342 postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', []) |
340 postgres_hooks.append(init_postgres_connexion) |
343 postgres_hooks.append(init_postgres_connexion) |