]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Use full column->type processing for ON CONFLICT SET clause
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Jan 2017 17:43:24 +0000 (12:43 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 13 Jan 2017 19:33:42 +0000 (14:33 -0500)
commitafd78a37dafe8e84e23bccfb570bd758797e2142
tree3f194e4c19b7b0c81f7f62a67fdb1a7ca763b013
parent0460bc79d9986132646049d8167bd5dbe3388a65
Use full column->type processing for ON CONFLICT SET clause

Fixed bug in new "ON CONFLICT DO UPDATE" feature where the "set"
values for the UPDATE clause would not be subject to type-level
processing, as normally takes effect to handle both user-defined
type level conversions as well as dialect-required conversions, such
as those required for JSON datatypes.   Additionally, clarified that
the keys in the set_ dictionary should match the "key" of the column,
if distinct from the column name.  A warning is emitted
for remaining column names that don't match column keys; for
compatibility reasons, these are emitted as they were previously.

Fixes: #3888
Change-Id: I67a04c67aa5f65e6d29f27bf3ef2f8257088d073
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/dml.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_on_conflict.py