]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Check row for None with implicit returning PK to accommodate ON CONFLICT
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 4 Oct 2016 20:46:08 +0000 (16:46 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 4 Oct 2016 21:31:40 +0000 (17:31 -0400)
commit20384e894577bc6cd7e686a71e6e859207565d00
treee4695f067ce8586070e5e3a40aec57f646dc022f
parente5a5a72e175d7c6a70d5b2a0399377c7a133cced
Check row for None with implicit returning PK to accommodate ON CONFLICT

An adjustment to ON CONFLICT such that the "inserted_primary_key"
logic is able to accommodate the case where there's no INSERT or
UPDATE and there's no net change.  The value comes out as None
in this case, rather than failing on an exception.

Change-Id: I0794e95c3ca262cb1ab2387167d96b8984225fce
Fixes: #3813
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/engine/default.py
test/dialect/postgresql/test_on_conflict.py