#17062: Using postgres, if you rollback the first transaction on a connection, 
the
effect of settings.TIME_ZONE is lost
-------------------------------------+-------------------------------------
     Reporter:  mwhudson             |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.3
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 That patch in #3459 reminds me of another point: why do we use the
 integers 0 and 1 in set_isolation_level? It would be much better to use
 the constants mentioned in psycopg2 documentation:
 [http://initd.org/psycopg/docs/extensions.html#transaction-status-
 constants]. Maybe not this tickets problem, though.

 I found it very useful to set log_statements to all in postgresql.conf
 (you can probably set that per user, also). That way I could see what
 queries psycopg2 actually generated, making it easier to minimize the
 amount of statements created in connect.

 There might be some point in memoizing the databases default time zone (in
 the same way we memoize the db version) and not doing the set for every
 connection if the default is already the correct one. Or perhaps you could
 pass the default time zone in connection parameters? Again, maybe not this
 ticket's problem, and maybe over-optimization, too.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17062#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to