equal
deleted
inserted
replaced
376 |
376 |
377 |
377 |
378 def init_postgres_connexion(cnx): |
378 def init_postgres_connexion(cnx): |
379 cnx.cursor().execute('SET TIME ZONE UTC') |
379 cnx.cursor().execute('SET TIME ZONE UTC') |
380 # commit is needed, else setting are lost if the connection is first |
380 # commit is needed, else setting are lost if the connection is first |
381 # rollbacked |
381 # rolled back |
382 cnx.commit() |
382 cnx.commit() |
383 |
383 |
384 postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', []) |
384 postgres_hooks = SQL_CONNECT_HOOKS.setdefault('postgres', []) |
385 postgres_hooks.append(init_postgres_connexion) |
385 postgres_hooks.append(init_postgres_connexion) |