/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/postgisdb.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/postgisdb.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2622 by bh, Thu Dec 16 15:18:57 2004 UTC revision 2623 by bh, Mon May 9 18:12:12 2005 UTC
# Line 1  Line 1 
1  # Copyright (C) 2003, 2004 by Intevation GmbH  # Copyright (C) 2003, 2004, 2005 by Intevation GmbH
2  # Authors:  # Authors:
3  # Martin Mueller <[email protected]>  # Martin Mueller <[email protected]>
4  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
# Line 107  class PostGISConnection: Line 107  class PostGISConnection:
107          except psycopg.OperationalError, val:          except psycopg.OperationalError, val:
108              raise ConnectionError(str(val))              raise ConnectionError(str(val))
109    
110            # Use autocommit mode.  For simple reading of the database it's
111            # sufficient and we don't have to care much about error
112            # handling.  Without autocommit, an errors during a cursor's
113            # execute method requires a rollback on the connection,
114            # otherwise later queries with the same or other cursors sharing
115            # the same connection will lead to further errors ("ERROR:
116            # current transaction is aborted, commands ignored until end of
117            # transaction block")
118            self.connection.autocommit()
119    
120          # determine the OID for the geometry type. This is PostGIS          # determine the OID for the geometry type. This is PostGIS
121          # specific.          # specific.
122          cursor = self.connection.cursor()          cursor = self.connection.cursor()

Legend:
Removed from v.2622  
changed lines
  Added in v.2623

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26