summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorChris Withers <chris@simplistix.co.uk>2010-04-13 16:48:24 +0100
committerChris Withers <chris@simplistix.co.uk>2010-04-13 16:48:24 +0100
commit7de6de60fcf4fcdc58344bafa1d718868f12c516 (patch)
tree7564092fb9db7d3e93c2dbd3132b881781e69f88 /lib/sqlalchemy/sql
parent51148074083b88d61761f29e86bd7655acdb9620 (diff)
parent5745f7a7c2eade1ff70ad7831854e4212eefe1bd (diff)
downloadsqlalchemy-7de6de60fcf4fcdc58344bafa1d718868f12c516.tar.gz
merge tip
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 78c65771b..7a1821a70 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -548,9 +548,12 @@ class SQLCompiler(engine.Compiled):
)
elif getattr(existing, '_is_crud', False):
raise exc.CompileError(
- "Bind parameter name '%s' is reserved "
- "for the VALUES or SET clause of this insert/update statement."
- % bindparam.key
+ "bindparam() name '%s' is reserved "
+ "for automatic usage in the VALUES or SET clause of this "
+ "insert/update statement. Please use a "
+ "name other than column name when using bindparam() "
+ "with insert() or update() (for example, 'b_%s')."
+ % (bindparam.key, bindparam.key)
)
self.binds[bindparam.key] = self.binds[name] = bindparam
@@ -906,9 +909,12 @@ class SQLCompiler(engine.Compiled):
bindparam._is_crud = True
if col.key in self.binds:
raise exc.CompileError(
- "Bind parameter name '%s' is reserved "
- "for the VALUES or SET clause of this insert/update statement."
- % col.key
+ "bindparam() name '%s' is reserved "
+ "for automatic usage in the VALUES or SET clause of this "
+ "insert/update statement. Please use a "
+ "name other than column name when using bindparam() "
+ "with insert() or update() (for example, 'b_%s')."
+ % (col.key, col.key)
)
self.binds[col.key] = bindparam