summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-02-26 20:15:02 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-02-26 20:15:02 +0000
commitc5fd3d13507479470fba2effc85094163e81dd6a (patch)
tree372c1d1acd3bd757df821eb1726b20f08f449d50 /lib/sqlalchemy/databases/postgres.py
parenta9afbd89437c680d1a270c28ce8beca58c34e49e (diff)
downloadsqlalchemy-c5fd3d13507479470fba2effc85094163e81dd6a.tar.gz
postgres wraps exec's in SQLError catch
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py
index 238310b1b..cd43bc3f0 100644
--- a/lib/sqlalchemy/databases/postgres.py
+++ b/lib/sqlalchemy/databases/postgres.py
@@ -248,7 +248,10 @@ class PGSQLEngine(ansisql.ANSISQLEngine):
to produce this correctly for an executemany, so we do our own executemany here."""
rowcount = 0
for param in parameters:
- c.execute(statement, param)
+ try:
+ c.execute(statement, param)
+ except Exception, e:
+ raise exceptions.SQLError(statement, param, e)
rowcount += c.rowcount
self.context.rowcount = rowcount