summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-01-28 15:20:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-01-28 15:20:21 -0500
commit09553dc90f4a95b314994b48068b046de1413104 (patch)
tree4103d05a99beb0ca07dea7def9aa0514809f10a1 /lib/sqlalchemy/dialects/postgresql
parent45e6875752fcaf7d3a60907959ed9d154cca0d5d (diff)
downloadsqlalchemy-09553dc90f4a95b314994b48068b046de1413104.tar.gz
- [feature] Dialect-specific compilers now raise
CompileException for all type/statement compilation issues, instead of InvalidRequestError or ArgumentError. The DDL for CREATE TABLE will re-raise CompileExceptions to include table/column information for the problematic column. [ticket:2361]
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index f2510744f..69c11d80f 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -874,7 +874,7 @@ class PGIdentifierPreparer(compiler.IdentifierPreparer):
def format_type(self, type_, use_schema=True):
if not type_.name:
- raise exc.ArgumentError("Postgresql ENUM type requires a name.")
+ raise exc.CompileError("Postgresql ENUM type requires a name.")
name = self.quote(type_.name, type_.quote)
if not self.omit_schema and use_schema and type_.schema is not None: